1
0
Fork 0

Check channel permission instead of guild permission

This commit is contained in:
Ethanell 2020-04-08 18:52:47 +02:00
parent 7c1159085c
commit 392ae5e3eb

View file

@ -20,7 +20,7 @@ class Purge(commands.Cog):
@commands.guild_only()
async def purge(self, ctx: commands.Context):
if ctx.invoked_subcommand is None:
if ctx.message.author.guild_permissions.manage_messages:
if ctx.message.channel.permissions_for(ctx.author).manage_messages:
self.purges[ctx.message.author.id] = ctx.message
await ctx.message.add_reaction("\U0001f44d")