如何制作静音命令discord.py

时间:2021-06-17 16:13:01

标签: python discord discord.py

My code so far

如何发出静音命令?

1 个答案:

答案 0 :(得分:0)

这对我有用

@bot.command(aliases=['m'])
@commands.has_permissions(kick_members = True)
async def mute(ctx,*,member : discord.Member):
  muted_role = ctx.guild.get_role([the mute role id])
  await member.remove_roles(muted_role)
  await ctx.send(f'**{member}** has been unmuted!')

如果有效请回复