Skip to content

Commit 905f039

Browse files
Fixed parameter namespace
1 parent fd5955f commit 905f039

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cogs/error_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def on_ready(self):
2222
print('Error Manager UP')
2323

2424
@commands.Cog.listener()
25-
async def on_command_error(self, ctx, error):
25+
async def on_command_error(self, ctx: commands.Context, error):
2626
prefix = Config.COMMAND_PREFIX
2727
embed = Embeds()
2828
embed.color = discord.Color.dark_red()
@@ -37,7 +37,7 @@ async def on_command_error(self, ctx, error):
3737
embed.description= f'Command not found! `{prefix}help` for a list of commands!'
3838

3939
elif isinstance(error, commands.BotMissingPermissions):
40-
missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in error.missing_perms]
40+
missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in error.missing_permissions]
4141
if len(missing) > 2:
4242
fmt = '{}, and {}'.format("**, **".join(missing[:-1]), missing[-1])
4343
else:
@@ -51,7 +51,7 @@ async def on_command_error(self, ctx, error):
5151
embed.description = 'This command is on cooldown, please retry in {}s.'.format(math.ceil(error.retry_after))
5252

5353
elif isinstance(error, commands.MissingPermissions):
54-
missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in error.missing_perms]
54+
missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in error.missing_permissions]
5555
if len(missing) > 2:
5656
fmt = '{}, and {}'.format("**, **".join(missing[:-1]), missing[-1])
5757
else:

0 commit comments

Comments
 (0)