【发布时间】:2021-10-19 12:41:05
【问题描述】:
我正在尝试删除我的 discord 服务器中的所有角色,但这需要大量时间。所以我决定用discord.py bot 来完成这个任务,但是我得到了这个错误:
discord.errors.HTTPException: 400 Bad Request (error code: 50028): Invalid Role
这是我的代码:
@client.command()
async def delroles(ctx):
for role in ctx.guild.roles:
await role.delete()
【问题讨论】:
标签: python discord discord.py