diff options
| -rw-r--r-- | bot/__main__.py | 8 | ||||
| -rw-r--r-- | bot/cogs/bot.py | 4 | ||||
| -rw-r--r-- | bot/cogs/clickup.py | 4 | ||||
| -rw-r--r-- | bot/cogs/cogs.py | 4 | ||||
| -rw-r--r-- | bot/cogs/deployment.py | 4 | ||||
| -rw-r--r-- | bot/cogs/eval.py | 4 | ||||
| -rw-r--r-- | bot/cogs/events.py | 4 | ||||
| -rw-r--r-- | bot/cogs/fun.py | 4 | ||||
| -rw-r--r-- | bot/cogs/hiphopify.py | 4 | ||||
| -rw-r--r-- | bot/cogs/logging.py | 4 | ||||
| -rw-r--r-- | bot/cogs/rmq.py | 4 | ||||
| -rw-r--r-- | bot/cogs/security.py | 4 | ||||
| -rw-r--r-- | bot/cogs/snakes.py | 4 | ||||
| -rw-r--r-- | bot/cogs/tags.py | 4 | ||||
| -rw-r--r-- | bot/cogs/verification.py | 4 | 
15 files changed, 32 insertions, 32 deletions
| diff --git a/bot/__main__.py b/bot/__main__.py index f6e5dfe0c..50027bf1b 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -3,15 +3,15 @@ import socket  from aiohttp import AsyncResolver, ClientSession, TCPConnector  from discord import Game -from discord.ext.commands import AutoShardedBot, when_mentioned_or +from discord.ext.commands import Bot, when_mentioned_or -from bot.constants import Bot, ClickUp +from bot.constants import Bot as BotConfig, ClickUp  from bot.formatter import Formatter  log = logging.getLogger(__name__) -bot = AutoShardedBot( +bot = Bot(      command_prefix=when_mentioned_or(          "self.", "bot."      ), @@ -62,6 +62,6 @@ bot.load_extension("bot.cogs.snakes")  bot.load_extension("bot.cogs.tags")  bot.load_extension("bot.cogs.verification") -bot.run(Bot.token) +bot.run(BotConfig.token)  bot.http_session.close()  # Close the aiohttp session when the bot finishes running diff --git a/bot/cogs/bot.py b/bot/cogs/bot.py index 3f0c8678d..6d574d0b1 100644 --- a/bot/cogs/bot.py +++ b/bot/cogs/bot.py @@ -4,7 +4,7 @@ import re  import time  from discord import Embed, Message -from discord.ext.commands import AutoShardedBot, Context, command, group +from discord.ext.commands import Bot, Context, command, group  from dulwich.repo import Repo  from bot.constants import ( @@ -20,7 +20,7 @@ class Bot:      Bot information commands      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot          # Stores allowed channels plus epoch time since last call. diff --git a/bot/cogs/clickup.py b/bot/cogs/clickup.py index a6a3d3caf..3509c001e 100644 --- a/bot/cogs/clickup.py +++ b/bot/cogs/clickup.py @@ -1,7 +1,7 @@  import logging  from discord import Colour, Embed -from discord.ext.commands import AutoShardedBot, Context, command +from discord.ext.commands import Bot, Context, command  from multidict import MultiDict  from bot.constants import ClickUp as ClickUpConfig, Roles @@ -31,7 +31,7 @@ class ClickUp:      ClickUp management commands      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot          self.lists = CaseInsensitiveDict() diff --git a/bot/cogs/cogs.py b/bot/cogs/cogs.py index d26f6b2c5..51693f9ef 100644 --- a/bot/cogs/cogs.py +++ b/bot/cogs/cogs.py @@ -2,7 +2,7 @@ import logging  import os  from discord import ClientException, Colour, Embed -from discord.ext.commands import AutoShardedBot, Context, command +from discord.ext.commands import Bot, Context, command  from bot.constants import (      Emojis, Roles, URLs, @@ -18,7 +18,7 @@ class Cogs:      Cog management commands      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot          self.cogs = {} diff --git a/bot/cogs/deployment.py b/bot/cogs/deployment.py index c33120af3..ca42fd980 100644 --- a/bot/cogs/deployment.py +++ b/bot/cogs/deployment.py @@ -1,7 +1,7 @@  import logging  from discord import Colour, Embed -from discord.ext.commands import AutoShardedBot, Context, command +from discord.ext.commands import Bot, Context, command  from bot.constants import Keys, Roles, URLs  from bot.decorators import with_role @@ -14,7 +14,7 @@ class Deployment:      Bot information commands      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot      @command(name="redeploy()", aliases=["bot.redeploy", "bot.redeploy()", "redeploy"]) diff --git a/bot/cogs/eval.py b/bot/cogs/eval.py index 9b8c50bb4..b6e5e0ec2 100644 --- a/bot/cogs/eval.py +++ b/bot/cogs/eval.py @@ -8,7 +8,7 @@ import traceback  from io import StringIO  import discord -from discord.ext.commands import AutoShardedBot, command +from discord.ext.commands import Bot, command  from bot.constants import Roles  from bot.decorators import with_role @@ -23,7 +23,7 @@ class CodeEval:      and returns the result to the channel.      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot          self.env = {}          self.ln = 0 diff --git a/bot/cogs/events.py b/bot/cogs/events.py index 213d8e0ad..5345a63b0 100644 --- a/bot/cogs/events.py +++ b/bot/cogs/events.py @@ -2,7 +2,7 @@ import logging  from discord import Embed, Member  from discord.ext.commands import ( -    AutoShardedBot, BadArgument, BotMissingPermissions, +    BadArgument, Bot, BotMissingPermissions,      CommandError, CommandInvokeError, Context,      NoPrivateMessage, UserInputError  ) @@ -21,7 +21,7 @@ class Events:      No commands, just event handlers      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot      async def send_updated_users(self, *users, replace_all=False): diff --git a/bot/cogs/fun.py b/bot/cogs/fun.py index 0abaf2469..57fa7cb1c 100644 --- a/bot/cogs/fun.py +++ b/bot/cogs/fun.py @@ -1,7 +1,7 @@  import logging  from discord import Message -from discord.ext.commands import AutoShardedBot +from discord.ext.commands import Bot  from bot.constants import Channels @@ -19,7 +19,7 @@ class Fun:      Fun, entirely useless stuff      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot      async def on_ready(self): diff --git a/bot/cogs/hiphopify.py b/bot/cogs/hiphopify.py index d1037616d..00c79809f 100644 --- a/bot/cogs/hiphopify.py +++ b/bot/cogs/hiphopify.py @@ -3,7 +3,7 @@ import random  from discord import Colour, Embed, Member  from discord.errors import Forbidden -from discord.ext.commands import AutoShardedBot, Context, command +from discord.ext.commands import Bot, Context, command  from bot.constants import (      Channels, Keys, @@ -21,7 +21,7 @@ class Hiphopify:      A set of commands to moderate terrible nicknames.      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot          self.headers = {"X-API-KEY": Keys.site_api} diff --git a/bot/cogs/logging.py b/bot/cogs/logging.py index 03f3dda06..05fed7042 100644 --- a/bot/cogs/logging.py +++ b/bot/cogs/logging.py @@ -1,7 +1,7 @@  import logging  from discord import Embed -from discord.ext.commands import AutoShardedBot +from discord.ext.commands import Bot  from bot.constants import Channels, DEBUG_MODE @@ -14,7 +14,7 @@ class Logging:      Debug logging module      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot      async def on_ready(self): diff --git a/bot/cogs/rmq.py b/bot/cogs/rmq.py index 6eb8c1f95..f6d2fbba0 100644 --- a/bot/cogs/rmq.py +++ b/bot/cogs/rmq.py @@ -5,7 +5,7 @@ import pprint  import aio_pika  from discord import Colour, Embed -from discord.ext.commands import AutoShardedBot +from discord.ext.commands import Bot  from discord.utils import get  from bot.constants import Channels, Guild, RabbitMQ @@ -34,7 +34,7 @@ class RMQ:      channel = None  # type: aio_pika.Channel      queue = None  # type: aio_pika.Queue -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot      async def on_ready(self): diff --git a/bot/cogs/security.py b/bot/cogs/security.py index 79f7cb07d..443dd08e8 100644 --- a/bot/cogs/security.py +++ b/bot/cogs/security.py @@ -1,6 +1,6 @@  import logging -from discord.ext.commands import AutoShardedBot, Context +from discord.ext.commands import Bot, Context  log = logging.getLogger(__name__) @@ -10,7 +10,7 @@ class Security:      Security-related helpers      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot          self.bot.check(self.check_not_bot)  # Global commands check - no bots can run any commands at all diff --git a/bot/cogs/snakes.py b/bot/cogs/snakes.py index 3f3632f10..78be08fab 100644 --- a/bot/cogs/snakes.py +++ b/bot/cogs/snakes.py @@ -14,7 +14,7 @@ from typing import Any, Dict  import aiohttp  import async_timeout  from discord import Colour, Embed, File, Member, Message, Reaction -from discord.ext.commands import AutoShardedBot, BadArgument, Context, bot_has_permissions, command +from discord.ext.commands import BadArgument, Bot, Context, bot_has_permissions, command  from PIL import Image, ImageDraw, ImageFont  from bot.constants import ERROR_REPLIES, Keys, URLs @@ -146,7 +146,7 @@ class Snakes:      wiki_brief = re.compile(r'(.*?)(=+ (.*?) =+)', flags=re.DOTALL)      valid_image_extensions = ('gif', 'png', 'jpeg', 'jpg', 'webp') -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.active_sal = {}          self.bot = bot          self.headers = {"X-API-KEY": Keys.site_api} diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py index b441e3d6a..82e009bf8 100644 --- a/bot/cogs/tags.py +++ b/bot/cogs/tags.py @@ -4,7 +4,7 @@ import time  from discord import Colour, Embed  from discord.ext.commands import ( -    AutoShardedBot, BadArgument, +    BadArgument, Bot,      Context, Converter, command  ) @@ -82,7 +82,7 @@ class Tags:      Save new tags and fetch existing tags.      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot          self.tag_cooldowns = {}          self.headers = {"X-API-KEY": Keys.site_api} diff --git a/bot/cogs/verification.py b/bot/cogs/verification.py index 38021b5e9..83a31c15a 100644 --- a/bot/cogs/verification.py +++ b/bot/cogs/verification.py @@ -1,7 +1,7 @@  import logging  from discord import Message, Object -from discord.ext.commands import AutoShardedBot, Context, command +from discord.ext.commands import Bot, Context, command  from bot.constants import Channels, Roles  from bot.decorators import in_channel, without_role @@ -14,7 +14,7 @@ class Verification:      """      User verification      """ -    def __init__(self, bot: AutoShardedBot): +    def __init__(self, bot: Bot):          self.bot = bot      async def on_message(self, message: Message): | 
