@@ -4,6 +4,7 @@ import nextcord
|
||||
from nextcord.ext import commands
|
||||
|
||||
from dakiny_bot.app import birthday_list
|
||||
from dakiny_bot.DakinySettings import settings
|
||||
|
||||
|
||||
class SubmissionListener(commands.Cog, name="Message Listener"):
|
||||
@@ -19,6 +20,14 @@ class SubmissionListener(commands.Cog, name="Message Listener"):
|
||||
if message.author.id == self.bot.user.id:
|
||||
return
|
||||
|
||||
# Ban all members who message in this channel. Everyone in guild is a member, so shouldn't miss a ban
|
||||
# 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_days=1, reason=f"{message.author.nick} messaged in the ban channel!"
|
||||
)
|
||||
return
|
||||
|
||||
await birthday_action(message)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user