aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2023-03-02 18:03:36 +0000
committerGravatar wookie184 <[email protected]>2023-03-02 18:03:36 +0000
commit076f0714a43006bff7c5d39aa80f898ab3254c26 (patch)
treec2a125c712a6d9d28bfad0c2c68ce41167c23455
parentSend a message when a user is unnominated due to being banned (diff)
Use get_or_fetch_channel instead of get_channel
-rw-r--r--bot/exts/recruitment/talentpool/_cog.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/recruitment/talentpool/_cog.py b/bot/exts/recruitment/talentpool/_cog.py
index c5a928f2b..bf4f2416e 100644
--- a/bot/exts/recruitment/talentpool/_cog.py
+++ b/bot/exts/recruitment/talentpool/_cog.py
@@ -147,7 +147,7 @@ class TalentPool(Cog, name="Talentpool"):
days=DAYS_UNTIL_INACTIVE
)
- nomination_discussion = self.bot.get_channel(Channels.nomination_discussion)
+ nomination_discussion = await get_or_fetch_channel(Channels.nomination_discussion)
for nomination in nominations:
if messages_per_user[nomination.user_id] > 0:
continue
@@ -500,7 +500,7 @@ class TalentPool(Cog, name="Talentpool"):
async def on_member_ban(self, guild: Guild, user: MemberOrUser) -> None:
"""Remove `user` from the talent pool after they are banned."""
if await self.end_nomination(user.id, "Automatic removal: User was banned"):
- nomination_discussion = self.bot.get_channel(Channels.nomination_discussion)
+ nomination_discussion = await get_or_fetch_channel(Channels.nomination_discussion)
await nomination_discussion.send(
f":warning: <@{user.id}> ({user.id})"
" was removed from the talentpool due to being banned."