Feat: Update the ban message.
For some reason, the user's name was None. I'm guessing because they were banned and are no longer a member or something. Don't need to record the member's name anyway though, as its already a part of the audit log.
This commit is contained in:
@@ -24,7 +24,7 @@ class SubmissionListener(commands.Cog, name="Message Listener"):
|
||||
# due to message.author not being a nextcord.Member object.
|
||||
if message.channel.id == settings.channel_ids.ban and isinstance(message.author, nextcord.Member):
|
||||
await message.author.ban(
|
||||
delete_message_seconds=30 * 60, reason=f"{message.author.nick} messaged in the ban channel!"
|
||||
delete_message_seconds=30 * 60, reason="Probable spam. The ban channel was messaged."
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user