fix(logger): fixed some stuff
This commit is contained in:
parent
24703bb32f
commit
6fbd2531a8
1 changed files with 8 additions and 4 deletions
|
@ -15,13 +15,17 @@ class Logger(commands.Cog):
|
|||
|
||||
@commands.Cog.listener()
|
||||
async def on_raw_message_delete(self, payload: discord.RawMessageDeleteEvent) -> None:
|
||||
if not payload.guild_id:
|
||||
if payload.guild_id:
|
||||
guild = self.bot.get_guild(payload.guild_id)
|
||||
if guild is None:
|
||||
return
|
||||
else:
|
||||
return
|
||||
|
||||
if await self.bot.cog_disabled_in_guild(self, payload.guild_id):
|
||||
if await self.bot.cog_disabled_in_guild(self, guild):
|
||||
return
|
||||
|
||||
if payload.channel_id in await config.guild(payload.guild_id).message_ignored_channels():
|
||||
if payload.channel_id in await config.guild(guild).message_ignored_channels():
|
||||
return
|
||||
|
||||
if payload.cached_message:
|
||||
|
@ -35,7 +39,7 @@ class Logger(commands.Cog):
|
|||
|
||||
author = payload.cached_message.author
|
||||
|
||||
c = await config.guild(payload.guild_id).message_delete_channel()
|
||||
c = await config.guild(guild).message_delete_channel()
|
||||
if c:
|
||||
channel = self.bot.get_channel(c)
|
||||
if channel:
|
||||
|
|
Loading…
Reference in a new issue