Fix none issue (#5125)

This commit is contained in:
Stonedestroyer 2021-06-14 02:11:55 +02:00 committed by GitHub
parent 8dffebbb34
commit 5ead38c284
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -442,7 +442,7 @@ class Filter(commands.Cog):
@commands.Cog.listener() @commands.Cog.listener()
async def on_message(self, message: discord.Message): async def on_message(self, message: discord.Message):
if isinstance(message.channel, discord.abc.PrivateChannel): if message.guild is None:
return return
if await self.bot.cog_disabled_in_guild(self, message.guild): if await self.bot.cog_disabled_in_guild(self, message.guild):