From f11c7cf7e4b0d0dc8e6f7dabb835795588e9eecb Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Tue, 20 Nov 2018 13:35:45 +0100 Subject: flake8 --- bot/cogs/hacktober/candy_collection.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bot/cogs/hacktober/candy_collection.py') diff --git a/bot/cogs/hacktober/candy_collection.py b/bot/cogs/hacktober/candy_collection.py index 508793a2..f5f17abb 100644 --- a/bot/cogs/hacktober/candy_collection.py +++ b/bot/cogs/hacktober/candy_collection.py @@ -1,9 +1,10 @@ -import discord -from discord.ext import commands -import random -import json import functools +import json import os +import random + +import discord +from discord.ext import commands from bot.constants import HACKTOBER_CHANNEL_ID @@ -126,7 +127,7 @@ class CandyCollection: for i in range(9): o = discord.Object(id=recent_msg.id + i) - msg = await channel.history(limit=1, before=o).next() + msg = await next(channel.history(limit=1, before=o)) ten_recent.append(msg.id) return ten_recent @@ -140,7 +141,7 @@ class CandyCollection: o = discord.Object(id=msg_id + 1) # Use history rather than get_message due to # poor ratelimit (50/1s vs 1/1s) - msg = await self.hacktober_channel.history(limit=1, before=o).next() + msg = await next(self.hacktober_channel.history(limit=1, before=o)) if msg.id != msg_id: return None -- cgit v1.2.3