aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/halloween/candy_collection.py
diff options
context:
space:
mode:
authorGravatar Quanta <[email protected]>2020-10-10 13:44:39 +0530
committerGravatar Quanta <[email protected]>2020-10-10 13:44:39 +0530
commitfa7dceb0a58118da6c42f71b9f666c4fe8fa80f4 (patch)
treeff30fc2f66c0325f8f4d7c6feacef30ae9a9e9d9 /bot/exts/halloween/candy_collection.py
parentApply suggested changes (diff)
Remove unused function get_message
Diffstat (limited to 'bot/exts/halloween/candy_collection.py')
-rw-r--r--bot/exts/halloween/candy_collection.py16
1 files changed, 0 insertions, 16 deletions
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)