• <i id='siB4i'><tr id='siB4i'><dt id='siB4i'><q id='siB4i'><span id='siB4i'><b id='siB4i'><form id='siB4i'><ins id='siB4i'></ins><ul id='siB4i'></ul><sub id='siB4i'></sub></form><legend id='siB4i'></legend><bdo id='siB4i'><pre id='siB4i'><center id='siB4i'></center></pre></bdo></b><th id='siB4i'></th></span></q></dt></tr></i><div id='siB4i'><tfoot id='siB4i'></tfoot><dl id='siB4i'><fieldset id='siB4i'></fieldset></dl></div>
  • <small id='siB4i'></small><noframes id='siB4i'>

    • <bdo id='siB4i'></bdo><ul id='siB4i'></ul>
      <tfoot id='siB4i'></tfoot>

      1. <legend id='siB4i'><style id='siB4i'><dir id='siB4i'><q id='siB4i'></q></dir></style></legend>

        Discord.py 如何发出静音命令?

        时间:2023-10-10
          <i id='D2FNO'><tr id='D2FNO'><dt id='D2FNO'><q id='D2FNO'><span id='D2FNO'><b id='D2FNO'><form id='D2FNO'><ins id='D2FNO'></ins><ul id='D2FNO'></ul><sub id='D2FNO'></sub></form><legend id='D2FNO'></legend><bdo id='D2FNO'><pre id='D2FNO'><center id='D2FNO'></center></pre></bdo></b><th id='D2FNO'></th></span></q></dt></tr></i><div id='D2FNO'><tfoot id='D2FNO'></tfoot><dl id='D2FNO'><fieldset id='D2FNO'></fieldset></dl></div>
          <legend id='D2FNO'><style id='D2FNO'><dir id='D2FNO'><q id='D2FNO'></q></dir></style></legend>
              <tbody id='D2FNO'></tbody>
            • <bdo id='D2FNO'></bdo><ul id='D2FNO'></ul>

                  <tfoot id='D2FNO'></tfoot>

                  <small id='D2FNO'></small><noframes id='D2FNO'>

                  本文介绍了Discord.py 如何发出静音命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  正如标题所说.我试图弄清楚如何使用 discord.py 重写来制作静音命令.我认为我们需要一个静音"角色,其中使用的命令为用户提供静音"角色以及持续多长时间.我如何做到这一点.

                  As the title says. I'm trying to figure out how to make a mute command using discord.py rewrite. I'm thinking that we need to have a "mute" role where the command used gives the user the "mute" role and for how long. How do I achieve this.

                  我已经有了

                  @bot.command()
                  @commands.has_permissions(mute_members)
                  async def mute(ctx, member:discord.Member):
                  

                  推荐答案

                  您可以创建一个静音角色,并让您的机器人将角色添加到您要静音的用户:

                  you can create a Muted role and make your bot add the role to the user you want to mute:

                  @bot.command()
                  async def mute(ctx, member: discord.Member):
                      role = discord.utils.get(ctx.guild.roles, name='Muted')
                      await member.add_roles(role)
                      await ctx.send("role added")
                  

                  这篇关于Discord.py 如何发出静音命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:当我的机器人发送时,Discord 没有嵌入链接 下一篇:如何仅在触发当前命令时使用命令?

                  相关文章

                  最新文章

                  <tfoot id='I8R4G'></tfoot>

                      <bdo id='I8R4G'></bdo><ul id='I8R4G'></ul>

                  1. <legend id='I8R4G'><style id='I8R4G'><dir id='I8R4G'><q id='I8R4G'></q></dir></style></legend>

                    <small id='I8R4G'></small><noframes id='I8R4G'>

                    1. <i id='I8R4G'><tr id='I8R4G'><dt id='I8R4G'><q id='I8R4G'><span id='I8R4G'><b id='I8R4G'><form id='I8R4G'><ins id='I8R4G'></ins><ul id='I8R4G'></ul><sub id='I8R4G'></sub></form><legend id='I8R4G'></legend><bdo id='I8R4G'><pre id='I8R4G'><center id='I8R4G'></center></pre></bdo></b><th id='I8R4G'></th></span></q></dt></tr></i><div id='I8R4G'><tfoot id='I8R4G'></tfoot><dl id='I8R4G'><fieldset id='I8R4G'></fieldset></dl></div>