From 28fa10462c8476deab0e4a4d439b5c97724bc7a9 Mon Sep 17 00:00:00 2001 From: Amrou Bellalouna Date: Sat, 26 Aug 2023 12:44:50 +0200 Subject: pass bot to get_or_fetch_channel in thread bumper (#2732) --- bot/exts/utils/thread_bumper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/exts/utils/thread_bumper.py b/bot/exts/utils/thread_bumper.py index c2bf0f39c..e93301e0c 100644 --- a/bot/exts/utils/thread_bumper.py +++ b/bot/exts/utils/thread_bumper.py @@ -2,12 +2,12 @@ import discord from discord.ext import commands from pydis_core.site_api import ResponseCodeError +from pydis_core.utils.channel import get_or_fetch_channel from bot import constants from bot.bot import Bot from bot.log import get_logger from bot.pagination import LinePaginator -from bot.utils import channel log = get_logger(__name__) THREAD_BUMP_ENDPOINT = "bot/bumped-threads" @@ -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(self.bot, thread_id) + thread = await 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}") -- cgit v1.2.3