Skip to content

Commit

Permalink
Fix client user on permission checks
Browse files Browse the repository at this point in the history
  • Loading branch information
0x16c3 committed Aug 17, 2021
1 parent e1c088c commit 1b2b407
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cogs/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ async def on_ready(self):
await database.feed_remove([item])
continue

permissions = channel.permissions_for(self.client)
permissions = channel.permissions_for(channel.guild.me)
if not permissions:
logger.debug(
f"Could not load <{item['username']}:{item['channel']}:{item['type']}> - Invalid permissions"
Expand Down Expand Up @@ -452,7 +452,7 @@ async def _activity(self, ctx: SlashContext, username: str):
)
return

permissions = ctx.channel.permissions_for(self.client)
permissions = ctx.channel.permissions_for(ctx.guild.me)
if not permissions or not permissions.send_messages:
embed = discord.Embed(
title="`Warning`",
Expand Down

0 comments on commit 1b2b407

Please sign in to comment.