Added logging for thread creation message deletion

This commit is contained in:
kku 2024-12-27 20:42:12 +01:00
parent 9417951f55
commit 7a64e334d2

View File

@ -43,7 +43,18 @@ class Logger(commands.Cog):
> 0
)
):
await message.delete()
try:
logger.info(
"Deleting the thread creation message in a custom channel %s",
message.channel.id,
)
await message.delete()
except Exception as exc:
logger.warning(
"Could not delete the thread creation message in a custom channel %s due to %s",
message.channel.id,
exc,
)
@commands.Cog.listener()
async def on_member_join(self, member: Member) -> None: