diff options
author | 2018-11-20 13:35:45 +0100 | |
---|---|---|
committer | 2018-11-20 13:35:45 +0100 | |
commit | f11c7cf7e4b0d0dc8e6f7dabb835795588e9eecb (patch) | |
tree | e6bacfbf899ee25062e0972c70f03f40d0254c17 /bot/cogs/hacktober | |
parent | Cleaning up bats a bit (diff) |
flake8
Diffstat (limited to 'bot/cogs/hacktober')
-rw-r--r-- | bot/cogs/hacktober/candy_collection.py | 13 | ||||
-rw-r--r-- | bot/cogs/hacktober/monstersurvey.py | 5 | ||||
-rw-r--r-- | bot/cogs/hacktober/spookyavatar.py | 2 |
3 files changed, 10 insertions, 10 deletions
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 diff --git a/bot/cogs/hacktober/monstersurvey.py b/bot/cogs/hacktober/monstersurvey.py index 9f33e31b..45587fe1 100644 --- a/bot/cogs/hacktober/monstersurvey.py +++ b/bot/cogs/hacktober/monstersurvey.py @@ -1,7 +1,6 @@ import json import logging import os -from typing import Optional, Union from discord import Embed from discord.ext import commands @@ -91,7 +90,7 @@ class MonsterSurvey: @monster_group.command( name='vote' ) - async def monster_vote(self, ctx: Context, name = None): + async def monster_vote(self, ctx: Context, name=None): """Casts a vote for a particular monster, or displays a list of monsters that can be voted for if one is not given.""" if name is None: @@ -133,7 +132,7 @@ class MonsterSurvey: @monster_group.command( name='show' ) - async def monster_show(self, ctx: Context, name = None): + async def monster_show(self, ctx: Context, name=None): """ Shows the named monster. If one is not named, it sends the default voting embed instead. :param ctx: diff --git a/bot/cogs/hacktober/spookyavatar.py b/bot/cogs/hacktober/spookyavatar.py index 694eb317..ad8a9242 100644 --- a/bot/cogs/hacktober/spookyavatar.py +++ b/bot/cogs/hacktober/spookyavatar.py @@ -1,5 +1,5 @@ -from io import BytesIO import os +from io import BytesIO import aiohttp import discord |