【发布时间】:2021-03-10 16:48:07
【问题描述】:
我有一个尚未解决的简单问题,我如何更改我的机器人自己的昵称,因为我想连续显示信息而不是它的昵称。
试过这个:
等待 bot.user.edit(用户名=价格)
但这实际上更改了不允许多次执行的用户名。
async def status_update():
while True:
price = str(get_BTC_price(ws))
await bot.user.edit(username=price)
await asyncio.sleep (2)
@bot.event
async def on_ready():
bot.loop.create_task(status_update())
谢谢
【问题讨论】:
-
问题已解决:
ctx.guild.me.edit(nick="new nickname here")