aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/halloween/candy_collection.py
diff options
context:
space:
mode:
authorGravatar Chris G <[email protected]>2019-09-10 22:34:30 -0600
committerGravatar GitHub <[email protected]>2019-09-10 22:34:30 -0600
commit8347c9ea91b5ec05cd57ddf6d40e88c9bac8ddd5 (patch)
tree82d0f8647b9fbb38e4462e0e26471da1124d506e /bot/seasons/halloween/candy_collection.py
parentUpdate contrib doc for allowing edits from maintainers (#268) (diff)
parentUpdate bot/seasons/evergreen/snakes/utils.py (diff)
Merge pull request #269 from python-discord/hacktoberfest-update
Hacktoberfest update & SaL Fix
Diffstat (limited to 'bot/seasons/halloween/candy_collection.py')
-rw-r--r--bot/seasons/halloween/candy_collection.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/bot/seasons/halloween/candy_collection.py b/bot/seasons/halloween/candy_collection.py
index d35cbee5..a7232e0d 100644
--- a/bot/seasons/halloween/candy_collection.py
+++ b/bot/seasons/halloween/candy_collection.py
@@ -121,15 +121,16 @@ class CandyCollection(commands.Cog):
async def ten_recent_msg(self):
"""Get the last 10 messages sent in the channel."""
ten_recent = []
- recent_msg = max(message.id for message
- in self.bot._connection._messages
- if message.channel.id == Channels.seasonalbot_chat)
+ recent_msg_id = max(
+ message.id for message in self.bot._connection._messages
+ if message.channel.id == Channels.seasonalbot_chat
+ )
channel = await self.hacktober_channel()
- ten_recent.append(recent_msg.id)
+ ten_recent.append(recent_msg_id)
for i in range(9):
- o = discord.Object(id=recent_msg.id + i)
+ o = discord.Object(id=recent_msg_id + i)
msg = await next(channel.history(limit=1, before=o))
ten_recent.append(msg.id)