diff options
author | 2023-08-26 12:44:50 +0200 | |
---|---|---|
committer | 2023-08-26 11:44:50 +0100 | |
commit | 28fa10462c8476deab0e4a4d439b5c97724bc7a9 (patch) | |
tree | 28b3ca5f66330f7d9ee0bf4aa5dfae7b2c977836 | |
parent | Merge pull request #2685 from python-discord/bump-to-pydis-core-10 (diff) |
pass bot to get_or_fetch_channel in thread bumper (#2732)
-rw-r--r-- | bot/exts/utils/thread_bumper.py | 4 |
1 files 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}") |