From fa7dceb0a58118da6c42f71b9f666c4fe8fa80f4 Mon Sep 17 00:00:00 2001 From: Quanta Date: Sat, 10 Oct 2020 13:44:39 +0530 Subject: Remove unused function get_message --- bot/exts/halloween/candy_collection.py | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'bot') diff --git a/bot/exts/halloween/candy_collection.py b/bot/exts/halloween/candy_collection.py index 88674f92..8f04f0bc 100644 --- a/bot/exts/halloween/candy_collection.py +++ b/bot/exts/halloween/candy_collection.py @@ -143,22 +143,6 @@ class CandyCollection(commands.Cog): return ten_recent - async def get_message(self, msg_id: int) -> Union[discord.Message, None]: - """Get the message from its ID.""" - try: - o = discord.Object(id=msg_id + 1) - # Use history rather than get_message due to - # poor ratelimit (50/1s vs 1/1s) - msg = await next(self.hacktober_channel.history(limit=1, before=o)) - - if msg.id != msg_id: - return None - - return msg - - except Exception: - return None - async def hacktober_channel(self) -> discord.TextChannel: """Get #hacktoberbot channel from its ID.""" return self.bot.get_channel(id=Channels.seasonalbot_commands) -- cgit v1.2.3