diff --git a/bot.py b/bot.py index 5f7b569..e9fba0a 100644 --- a/bot.py +++ b/bot.py @@ -44,14 +44,6 @@ async def on_ready() -> None: await bot.change_presence(activity=config.activity(), status=config.status()) await bot.tree.sync() # Sync global commands (might take up to 1 hour to reflect globally) - guild = bot.get_guild(GUILD_ID) - bot_member = guild.get_member(bot.user.id) - - if bot_member.guild_permissions.administrator or bot_member.guild_permissions.manage_guild: - await print("Bot has the required permissions to sync commands.", flush=True) - else: - await print("Bot is missing required permissions.", flush=True) - except BadArgument as e: print(f'Error changing presence. Exception - {e}', flush=True) except discord.HTTPException as e: diff --git a/cogs/tasks.py b/cogs/tasks.py index cb1f66f..b422c64 100644 --- a/cogs/tasks.py +++ b/cogs/tasks.py @@ -100,7 +100,7 @@ async def user_check(self, interaction: discord.Integration): async def sync_commands(self, override=False): now = datetime.now().isoformat() - guild = discord.Object(id=GUILD_ID) + guild = self.bot.get_guild(id=GUILD_ID) bot_member = guild.get_member(self.bot.user.id) try: @@ -114,11 +114,6 @@ async def sync_commands(self, override=False): await self.bot.tree.sync(guild=guild) # Sync commands to a specific guild for faster deployment else: await self.bot.tree.sync() # Sync global commands (might take up to 1 hour to reflect globally) - - if bot_member.guild_permissions.administrator or bot_member.guild_permissions.manage_guild: - await print("Bot has the required permissions to sync commands.", flush=True) - else: - await print("Bot is missing required permissions.", flush=True) except discord.HTTPException as e: print(f"Failed to sync commands due to rate limiting: {e}")