From 392ae5e3eb49c06abfb4be7e5a0490115361a0d6 Mon Sep 17 00:00:00 2001 From: flifloo Date: Wed, 8 Apr 2020 18:52:47 +0200 Subject: [PATCH] Check channel permission instead of guild permission --- extensions/purge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/purge.py b/extensions/purge.py index c075218..aa43ab9 100644 --- a/extensions/purge.py +++ b/extensions/purge.py @@ -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")