发生奇怪的错误-discord.py重写json操作

时间:2020-07-23 15:32:27

标签: python discord.py discord.py-rewrite

因此,我正在尝试将用户注册到我的Karma系统中。我将代码两次用于2个类似的系统。一种是货币,一种是水平(这个是水平)。

我收到错误discord.ext.commands.errors.CommandInvokeError:命令引发异常:TypeError:'Command'类型的参数不可迭代

@bot.command(pass_context=True)
async def karmaregister(ctx):
    id = str(ctx.message.author.id)
    if id not in karma:
        karma[id] = 0
        await ctx.send("You are now registered to karma in AccoladeBot.")
        _save()
    else:
        await ctx.send("You already are registered to karma.")

0 个答案:

没有答案