Fixed ctx message guild error

This commit is contained in:
Sven Heidemann 2022-07-19 17:02:32 +02:00
parent 51ceaba806
commit 5bf89f03da

View File

@ -107,7 +107,5 @@ class MessageService(MessageServiceABC):
await self.delete_message(ctx.message, without_tracking)
return
if ctx.guild is None:
self._logger.error(__name__, f'Error in {__name__}.send_ctx_msg: Guild is None')
return
await self.delete_messages(List(discord.Message, [msg, ctx.message]), ctx.guild.id)
if ctx.guild is not None:
await self.delete_messages(List(discord.Message, [msg, ctx.message]), ctx.guild.id)