Closed kennnyshiwa closed 4 years ago
Added a quick fix for this - might cause the top 10 list to be shorter than it should be, but this should stop any errors from occurring until I get a proper fix for it.
Do [p]cog update
for the fix.
so that fixed that section but then caused this error to happen as a result
Traceback (most recent call last):
File "/home/bb8/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 79, in wrapped
ret = await coro(*args, **kwargs)
File "/home/bb8/customcogs/duel/duel.py", line 504, in _duels
await ctx.invoke(self._duels_list)
File "/home/bb8/venv/lib/python3.7/site-packages/discord/ext/commands/context.py", line 132, in invoke
ret = await command.callback(*arguments, **kwargs)
File "/home/bb8/customcogs/duel/duel.py", line 560, in _duels_list
highscore += names[uid].ljust(max_name_len + 4)
KeyError: 620685765277384705
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bb8/venv/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 863, in invoke
await ctx.command.invoke(ctx)
File "/home/bb8/venv/lib/python3.7/site-packages/redbot/core/commands/commands.py", line 582, in invoke
await super().invoke(ctx)
File "/home/bb8/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 1163, in invoke
await super().invoke(ctx)
File "/home/bb8/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 728, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/home/bb8/venv/lib/python3.7/site-packages/discord/ext/commands/core.py", line 88, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 620685765277384705```
I've fixed that error as well, try it now.
Totally forgot all about this, so sorry about that, but can confirm this did fix my issue! Thanks a ton!
So ona server where my bot is, there is an issue with the duels command which i believe is happening cus the user left so it can't get the display name for that user it produces this error below