fix: await bot.add_cog() in cogs/admin.py
This commit is contained in:
parent
43ca943cb8
commit
087fea31b0
@ -69,7 +69,6 @@ class AdminCog(Cog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self.bot.fetch_emojis(ctx.guild)
|
|
||||||
emojis = await self.bot.fetch_emojis(ctx.guild)
|
emojis = await self.bot.fetch_emojis(ctx.guild)
|
||||||
emoji = None
|
emoji = None
|
||||||
for e in emojis:
|
for e in emojis:
|
||||||
@ -101,7 +100,6 @@ class AdminCog(Cog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self.bot.fetch_emojis(ctx.guild)
|
|
||||||
emojis = await self.bot.fetch_emojis(ctx.guild)
|
emojis = await self.bot.fetch_emojis(ctx.guild)
|
||||||
emoji = None
|
emoji = None
|
||||||
for e in emojis:
|
for e in emojis:
|
||||||
@ -132,7 +130,6 @@ class AdminCog(Cog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self.bot.fetch_emojis(ctx.guild)
|
|
||||||
emojis = await self.bot.fetch_emojis(ctx.guild)
|
emojis = await self.bot.fetch_emojis(ctx.guild)
|
||||||
emoji = None
|
emoji = None
|
||||||
for e in emojis:
|
for e in emojis:
|
||||||
@ -151,6 +148,6 @@ class AdminCog(Cog):
|
|||||||
await ctx.send(f"Error: {e}")
|
await ctx.send(f"Error: {e}")
|
||||||
|
|
||||||
|
|
||||||
def setup(bot: commands.Bot) -> None:
|
async def setup(bot: commands.Bot) -> None:
|
||||||
"""Register the admin cog with the bot."""
|
"""Register the admin cog with the bot."""
|
||||||
bot.add_cog(AdminCog(bot))
|
await bot.add_cog(AdminCog(bot))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user