diff options
| author | 2022-11-02 02:07:29 -0700 | |
|---|---|---|
| committer | 2022-11-02 02:07:29 -0700 | |
| commit | 43a2acf5ee4eb354ce3dfaeef9504eee9b9b46b4 (patch) | |
| tree | cbdfeb08f8d582aa98acec6a529f0fa3dcd7933c /bot/exts/holidays/halloween/candy_collection.py | |
| parent | Appeased the formatter (diff) | |
| parent | Merge pull request #1137 from DivyanshuBist/bug-issue1122-message-of-type-None (diff) | |
Merge branch 'main' into main
Diffstat (limited to 'bot/exts/holidays/halloween/candy_collection.py')
| -rw-r--r-- | bot/exts/holidays/halloween/candy_collection.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/bot/exts/holidays/halloween/candy_collection.py b/bot/exts/holidays/halloween/candy_collection.py index 220ba8e5..683114f9 100644 --- a/bot/exts/holidays/halloween/candy_collection.py +++ b/bot/exts/holidays/halloween/candy_collection.py @@ -88,10 +88,7 @@ class CandyCollection(commands.Cog): if message.author.bot: return - recent_message_ids = map( - lambda m: m.id, - await self.hacktober_channel.history(limit=10).flatten() - ) + recent_message_ids = [message.id async for message in self.hacktober_channel.history(limit=10)] if message.id in recent_message_ids: await self.reacted_msg_chance(message) return @@ -214,6 +211,6 @@ class CandyCollection(commands.Cog): await ctx.send(embed=e) -def setup(bot: Bot) -> None: +async def setup(bot: Bot) -> None: """Load the Candy Collection Cog.""" - bot.add_cog(CandyCollection(bot)) + await bot.add_cog(CandyCollection(bot)) |