Added logging for thread creation message deletion
This commit is contained in:
parent
9417951f55
commit
7a64e334d2
@ -43,7 +43,18 @@ class Logger(commands.Cog):
|
|||||||
> 0
|
> 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()
|
@commands.Cog.listener()
|
||||||
async def on_member_join(self, member: Member) -> None:
|
async def on_member_join(self, member: Member) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user