Skip to content

Commit cce120a

Browse files
committed
Not much was changed in that new update, core features still work, but some code could be rewritten
1 parent e48734c commit cce120a

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

cogs/modmail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from core.utils import format_preview, User
1919

2020

21-
class Modmail:
21+
class Modmail(commands.Cog):
2222
"""Commands directly related to Modmail functionality."""
2323

2424
def __init__(self, bot: Bot):

cogs/plugins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class DownloadError(Exception):
1919
pass
2020

2121

22-
class Plugins:
22+
class Plugins(commands.Cog):
2323
"""Plugins expand Modmail functionality by allowing third-party addons.
2424
2525
These addons could have a range of features from moderation to simply

cogs/utility.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
logger = logging.getLogger('Modmail')
2727

2828

29-
class Utility:
29+
class Utility(commands.Cog):
3030
"""General commands that provide utility"""
3131

3232
def __init__(self, bot: Bot):
@@ -52,7 +52,7 @@ async def format_cog_help(self, ctx, cog):
5252
fmts = ['']
5353
for cmd in sorted(self.bot.commands,
5454
key=lambda cmd: cmd.qualified_name):
55-
if cmd.instance is cog and not cmd.hidden and \
55+
if cmd.cog is cog and not cmd.hidden and \
5656
await self.verify_checks(ctx, cmd):
5757
new_fmt = f'`{prefix + cmd.qualified_name}` - '
5858
new_fmt += f'{cmd.short_doc}\n'
@@ -580,6 +580,7 @@ async def set_presence(self, *,
580580
presence['status'] = (status, msg)
581581
return presence
582582

583+
@commands.Cog.listener()
583584
async def on_ready(self):
584585
# Wait until config cache is populated with stuff from db
585586
await self.bot.config.wait_until_ready()

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
git+https://github.com/Rapptz/discord.py@7f4c57dd5ad20b7fa10aea485f674a4bc24b9547
1+
git+https://github.com/Rapptz/discord.py
22
colorama>=0.4.0
33
python-dateutil>=2.7.0
44
emoji>=0.2

0 commit comments

Comments
 (0)