【问题标题】:How to change bot username / avatar with Discord.py rewrite?如何使用 Discord.py 重写更改机器人用户名/头像?
【发布时间】:2019-02-20 06:40:23
【问题描述】:

我一直在寻找如何做到这一点,但似乎我能找到的唯一解决方案不起作用。

【问题讨论】:

  • 你能提供更多细节吗?

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


【解决方案1】:

在代表您的机器人的 Client.user 对象上使用 ClientUser.edit

@bot.command()
async def rename(ctx, name):
    await bot.user.edit(username=name)

【讨论】:

  • 你会如何改变头像?
  • await bot.user.edit(avatar=b) 其中b 是一些bytes-like object
  • 机器人从何而来?
  • 另外,您如何实际使用它来动态重命名您的机器人? ?
猜你喜欢
  • 1970-01-01
  • 2018-04-04
  • 2020-03-26
  • 2015-12-03
  • 1970-01-01
  • 1970-01-01
  • 2019-05-26
  • 1970-01-01
  • 2021-02-13
相关资源
最近更新 更多