如何重置服务器中所有成员的昵称?
How to reset nicknames of all members in the server?
我想重置服务器中每个人的昵称。我能怎么做?我应该使用哪个代码?
我是编码新手。我什么都没试。
@bot.command() # command decorator
@commands.has_permissions(change_nickname=True) # check for change nickname permission
async def reset(ctx):
for member in ctx.guild.members: # loop through every member in the guild
await member.edit(nick=None) # reset their nickname
我想重置服务器中每个人的昵称。我能怎么做?我应该使用哪个代码?
我是编码新手。我什么都没试。
@bot.command() # command decorator
@commands.has_permissions(change_nickname=True) # check for change nickname permission
async def reset(ctx):
for member in ctx.guild.members: # loop through every member in the guild
await member.edit(nick=None) # reset their nickname