Ignoring exception in command Test:
Traceback (most recent call last):
File "C:\Users\stas\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.p
ret = await coro(*args, **kwargs)
File "save.py", line 26, in Test
await add_coins(users, ctx.author, 50000)
File "save.py", line 33, in add_coins
users[str(user.id)]['coins'] += coin
KeyError: '293396418834464768'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\stas\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py
await ctx.command.invoke(ctx)
File "C:\Users\stas\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.p
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\stas\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.p
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: '293396418834464768'
@bot.command(pass_context = True)
async def Test(ctx):
global a
global b
await ctx.send('Тест')
if a < b:
a = 30
b = 40
await ctx.send('А меньше Б')