【发布时间】:2021-04-05 00:16:29
【问题描述】:
我试图让机器人的名称在每次运行时都更改。我检查了 discord.py 文档,但没有任何用处,也没有任何错误。有什么想法吗?
拥有“管理员”和“更改昵称”权限
import discord
from discord.ext import commands
from discord.ext.commands import bot
bot = commands.Bot(command_prefix=PREFIX)
bot.remove_command('help')
@bot.event
async def on_ready():
await bot.user.edit(nick="New Nickname")
bot.run(TOKEN)
【问题讨论】:
-
机器人是否有权更改昵称?
-
是的,有管理员和更改昵称
标签: python discord.py