Python 3.8.6的Discord Bot语音静音命令

时间:2020-10-18 06:57:45

标签: discord.py mute

我正在使用3.8.6版的Python ....我想给discord bot静音命令...但是代码不起作用...

不起作用

@commands.command()
async def mute(self, ctx, member : discord.Member):
  try:
    await member.edit(mute=True)
  except:
    await ctx.send('Sorry! I cant mute this member.')

-------------------------------------------------------

@commands.command()
async def mute(self, ctx):
    await ctx.author.edit(mute=True)

0 个答案:

没有答案