您可以执行 for loops 并遍历公会角色,然后删除每个角色。示例
for roles in ctx.guild.roles:
if role.name != "role name that you want to exclude":
pass
else:
await roles.delete(reason="Reason Here")
await ctx.send("Deletion Complete.", delete_after=3)
检查 ctx.guild.roles 的 docs,
并检查 docs for delete()