diff --git a/cogs/inspection.py b/cogs/inspection.py index 5ff8c87..a9ceed1 100644 --- a/cogs/inspection.py +++ b/cogs/inspection.py @@ -287,7 +287,7 @@ async def _revokeinvites( deletion_count = 0 await inter.response.defer(ephemeral=True) - for invite in await inter.guild.invites(): + async for invite in inter.guild.invites(): if (member and invite.inviter == member) or (not member): await invite.delete() deletion_count += 1 diff --git a/cogs/moderation.py b/cogs/moderation.py index 82a68d0..0f9eb6f 100644 --- a/cogs/moderation.py +++ b/cogs/moderation.py @@ -293,7 +293,7 @@ def find_hook(name: str) -> disnake.Webhook | None: else: pass - for webhook in await inter.channel.webhooks(): + async for webhook in inter.channel.webhooks(): if webhook.user == self.bot.user: await webhook.delete() @@ -429,7 +429,7 @@ async def _banword( keywords = keywords.split(',') try: - for item in await inter.guild.fetch_automod_rules(): + async for item in inter.guild.fetch_automod_rules(): if item.name == 'IgKnite Banwords': rule = item break @@ -475,7 +475,7 @@ async def _clearbannedwords(self, inter: disnake.CommandInteraction) -> None: await inter.response.defer(ephemeral=True) try: - for rule in await inter.guild.fetch_automod_rules(): + async for rule in inter.guild.fetch_automod_rules(): if rule.name == 'IgKnite Banwords': await rule.delete(reason=f'Banwords removed by: {inter.author}') @@ -498,7 +498,7 @@ async def _showbannedwords(self, inter: disnake.CommandInteraction) -> None: try: words = '' - for rule in await inter.guild.fetch_automod_rules(): + async for rule in inter.guild.fetch_automod_rules(): if rule.name == 'IgKnite Banwords': words += (f'{item} \n' for item in rule.trigger_metadata.keyword_filter) embed = (