Discord 经济机器人不会发送消息

时间:2021-03-31 04:09:27

标签: python discord discord.py bots

下面是我使用的代码

    @client.command()
    async def bal(ctx):
      await open_acc(ctx.author)
      user = ctx.author
      users = await get_bank_data()
    
      wallet_amt = users[str(user.id)]["wallet"] = 0
      bank_amt = users[str(user.id)]["bank"] = 0
    
      balEmbed = discord.Embed(title=f"{ctx.author.name}'s balance",color=0x008000)
      balEmbed.add_field(name="Wallet", value=(wallet_amt))
      balEmbed.add_field(name="Bank", value=(bank_amt))
    
      await ctx.send(embed=balEmbed)

我使用上述代码,然后我执行;bal(我已经将前缀设置为“;”)。但是,机器人将无法工作,并且控制台中几乎没有错误代码。有什么不对?不过,任何形式的帮助都非常感谢。非常感谢。

0 个答案:

没有答案