aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/info/patreon.py4
-rw-r--r--bot/exts/info/subscribe.py2
-rw-r--r--bot/exts/moderation/watchchannels/_watchchannel.py2
-rw-r--r--bot/exts/recruitment/talentpool/_cog.py6
-rw-r--r--bot/exts/recruitment/talentpool/_review.py2
-rw-r--r--bot/exts/utils/thread_bumper.py2
6 files changed, 9 insertions, 9 deletions
diff --git a/bot/exts/info/patreon.py b/bot/exts/info/patreon.py
index 9065b0a11..948568101 100644
--- a/bot/exts/info/patreon.py
+++ b/bot/exts/info/patreon.py
@@ -64,7 +64,7 @@ class Patreon(commands.Cog):
f":tada: {after.mention} just became a **tier {new_patreon_tier}** patron!\n"
"Support us on Patreon: https://pydis.com/patreon"
)
- channel = await get_or_fetch_channel(Channels.meta)
+ channel = await get_or_fetch_channel(self.bot, Channels.meta)
await channel.send(message)
async def send_current_supporters(self, channel: discord.abc.Messageable, automatic: bool = False) -> None:
@@ -120,7 +120,7 @@ class Patreon(commands.Cog):
"""A loop running daily to see if it's the first of the month. If so call `self.send_current_supporters()`."""
now = arrow.utcnow()
if now.day == 1:
- meta_channel = await get_or_fetch_channel(Channels.meta)
+ meta_channel = await get_or_fetch_channel(self.bot, Channels.meta)
await self.send_current_supporters(meta_channel, automatic=True)
diff --git a/bot/exts/info/subscribe.py b/bot/exts/info/subscribe.py
index 0b204e3b2..048884587 100644
--- a/bot/exts/info/subscribe.py
+++ b/bot/exts/info/subscribe.py
@@ -198,7 +198,7 @@ class Subscribe(commands.Cog):
If the initial message isn't found, a new one will be created.
This message will always be needed to attach the persistent view to it
"""
- roles_channel: discord.TextChannel = await get_or_fetch_channel(constants.Channels.roles)
+ roles_channel: discord.TextChannel = await get_or_fetch_channel(self.bot, constants.Channels.roles)
async for message in roles_channel.history(limit=30):
if message.content == self.SELF_ASSIGNABLE_ROLES_MESSAGE:
diff --git a/bot/exts/moderation/watchchannels/_watchchannel.py b/bot/exts/moderation/watchchannels/_watchchannel.py
index 37b02f916..fb75d525d 100644
--- a/bot/exts/moderation/watchchannels/_watchchannel.py
+++ b/bot/exts/moderation/watchchannels/_watchchannel.py
@@ -98,7 +98,7 @@ class WatchChannel(metaclass=CogABCMeta):
await self.bot.wait_until_guild_available()
try:
- self.channel = await get_or_fetch_channel(self.destination)
+ self.channel = await get_or_fetch_channel(self.bot, self.destination)
except HTTPException:
self.log.exception(f"Failed to retrieve the text channel with id `{self.destination}`")
diff --git a/bot/exts/recruitment/talentpool/_cog.py b/bot/exts/recruitment/talentpool/_cog.py
index bc82de060..9c180b5ab 100644
--- a/bot/exts/recruitment/talentpool/_cog.py
+++ b/bot/exts/recruitment/talentpool/_cog.py
@@ -146,7 +146,7 @@ class TalentPool(Cog, name="Talentpool"):
days=DAYS_UNTIL_INACTIVE
)
- nomination_discussion = await get_or_fetch_channel(Channels.nomination_discussion)
+ nomination_discussion = await get_or_fetch_channel(self.bot, Channels.nomination_discussion)
for nomination in nominations:
if messages_per_user[nomination.user_id] > 0:
continue
@@ -553,7 +553,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 = await get_or_fetch_channel(Channels.nomination_discussion)
+ nomination_discussion = await get_or_fetch_channel(self.bot, Channels.nomination_discussion)
await nomination_discussion.send(
f":warning: <@{user.id}> ({user.id})"
" was removed from the talentpool due to being banned."
@@ -614,7 +614,7 @@ class TalentPool(Cog, name="Talentpool"):
if nomination.thread_id:
try:
- thread = await get_or_fetch_channel(nomination.thread_id)
+ thread = await get_or_fetch_channel(self.bot, nomination.thread_id)
except discord.HTTPException:
thread_jump_url = "*Not found*"
else:
diff --git a/bot/exts/recruitment/talentpool/_review.py b/bot/exts/recruitment/talentpool/_review.py
index 8752669a3..fc48809c0 100644
--- a/bot/exts/recruitment/talentpool/_review.py
+++ b/bot/exts/recruitment/talentpool/_review.py
@@ -502,7 +502,7 @@ class Reviewer:
if nomination.thread_id is None:
continue
try:
- thread = await get_or_fetch_channel(nomination.thread_id)
+ thread = await get_or_fetch_channel(self.bot, nomination.thread_id)
except discord.HTTPException:
# Nothing to do here
pass
diff --git a/bot/exts/utils/thread_bumper.py b/bot/exts/utils/thread_bumper.py
index e6c47c1ba..c2bf0f39c 100644
--- a/bot/exts/utils/thread_bumper.py
+++ b/bot/exts/utils/thread_bumper.py
@@ -69,7 +69,7 @@ class ThreadBumper(commands.Cog):
threads_to_maybe_bump = []
for thread_id in await self.bot.api_client.get(THREAD_BUMP_ENDPOINT):
try:
- thread = await channel.get_or_fetch_channel(thread_id)
+ thread = await channel.get_or_fetch_channel(self.bot, thread_id)
except discord.NotFound:
log.info("Thread %d has been deleted, removing from bumped threads.", thread_id)
await self.bot.api_client.delete(f"{THREAD_BUMP_ENDPOINT}/{thread_id}")