Compare commits
2
Commits
70037fb47a
...
e35a2a8c8d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e35a2a8c8d | ||
|
|
d7046e4595 |
@@ -17,6 +17,7 @@ class ChannelIds:
|
|||||||
event_post: int
|
event_post: int
|
||||||
general: int
|
general: int
|
||||||
voting: int
|
voting: int
|
||||||
|
ban: int
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import nextcord
|
|||||||
from nextcord.ext import commands
|
from nextcord.ext import commands
|
||||||
|
|
||||||
from dakiny_bot.app import birthday_list
|
from dakiny_bot.app import birthday_list
|
||||||
|
from dakiny_bot.DakinySettings import settings
|
||||||
|
|
||||||
|
|
||||||
class SubmissionListener(commands.Cog, name="Message Listener"):
|
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:
|
if message.author.id == self.bot.user.id:
|
||||||
return
|
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)
|
await birthday_action(message)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user