Skip to content

Commit 18cec89

Browse files
+ Added type hinting
1 parent 9a42aa6 commit 18cec89

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

src/cogs/error_manager.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@
99

1010
class ErrorManager(commands.Cog):
1111
"""hidden"""
12-
def __init__(self, client):
12+
13+
client: commands.Bot
14+
15+
16+
def __init__(self, client: commands.Bot):
1317
self.client = client
1418

19+
1520
@commands.Cog.listener()
1621
async def on_ready(self):
17-
print('Error manager online')
22+
print('Error Manager UP')
1823

1924
@commands.Cog.listener()
2025
async def on_command_error(self, ctx, error):
@@ -79,5 +84,5 @@ async def on_command_error(self, ctx, error):
7984

8085

8186

82-
async def setup(client):
87+
async def setup(client: commands.Bot):
8388
await client.add_cog(ErrorManager(client))

src/cogs/help_command.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,19 @@ class Help(commands.Cog):
1010
Sends this help message
1111
"""
1212

13-
def __init__(self, client):
13+
client: commands.Bot
14+
15+
16+
def __init__(self, client: commands.Bot):
1417
self.client = client
1518
client.remove_command('help')
1619

20+
21+
@commands.Cog.listener()
22+
async def on_ready(self):
23+
print('Help command UP')
24+
25+
1726
@commands.hybrid_command(
1827
name = 'help',
1928
description = 'Sends the Help Command',
@@ -92,5 +101,5 @@ async def add_to_embed(cmd):
92101
await ctx.reply(embed = embed)
93102

94103

95-
async def setup(client):
104+
async def setup(client: commands.Bot):
96105
await client.add_cog(Help(client))

0 commit comments

Comments
 (0)