fix: await bot.add_cog() in cogs/admin.py

This commit is contained in:
Benjamyn committed 2026-08-27 16:17:12 +10:00
1 parent 43ca943cb8
commit 087fea31b0
1 file changed
+2 -5
+2 -5
View File
@@ -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))