aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2023-02-26 17:58:09 +0000
committerGravatar wookie184 <[email protected]>2023-02-26 17:58:09 +0000
commit910c567173be950a33cc472a3ad611497e39bd3e (patch)
tree924a8b8db8212ed0b991581ef726b8e743d2454c
parentUpdate tp list command, making it sort by review order by default (diff)
Send a message when a user is unnominated due to being banned
-rw-r--r--bot/exts/recruitment/talentpool/_cog.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bot/exts/recruitment/talentpool/_cog.py b/bot/exts/recruitment/talentpool/_cog.py
index 83a9a8191..c5a928f2b 100644
--- a/bot/exts/recruitment/talentpool/_cog.py
+++ b/bot/exts/recruitment/talentpool/_cog.py
@@ -499,7 +499,12 @@ class TalentPool(Cog, name="Talentpool"):
@Cog.listener()
async def on_member_ban(self, guild: Guild, user: MemberOrUser) -> None:
"""Remove `user` from the talent pool after they are banned."""
- await self.end_nomination(user.id, "User was banned.")
+ if await self.end_nomination(user.id, "Automatic removal: User was banned"):
+ nomination_discussion = self.bot.get_channel(Channels.nomination_discussion)
+ await nomination_discussion.send(
+ f":warning: <@{user.id}> ({user.id})"
+ " was removed from the talentpool due to being banned."
+ )
@Cog.listener()
async def on_raw_reaction_add(self, payload: RawReactionActionEvent) -> None: