久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<i id='35Ziu'><tr id='35Ziu'><dt id='35Ziu'><q id='35Ziu'><span id='35Ziu'><b id='35Ziu'><form id='35Ziu'><ins id='35Ziu'></ins><ul id='35Ziu'></ul><sub id='35Ziu'></sub></form><legend id='35Ziu'></legend><bdo id='35Ziu'><pre id='35Ziu'><center id='35Ziu'></center></pre></bdo></b><th id='35Ziu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='35Ziu'><tfoot id='35Ziu'></tfoot><dl id='35Ziu'><fieldset id='35Ziu'></fieldset></dl></div>

    1. <tfoot id='35Ziu'></tfoot>

    2. <legend id='35Ziu'><style id='35Ziu'><dir id='35Ziu'><q id='35Ziu'></q></dir></style></legend>

        <small id='35Ziu'></small><noframes id='35Ziu'>

          <bdo id='35Ziu'></bdo><ul id='35Ziu'></ul>

        檢查用戶是否在 discord.py 中具有權限

        Check if user has permission in discord.py(檢查用戶是否在 discord.py 中具有權限)
        <i id='HuukQ'><tr id='HuukQ'><dt id='HuukQ'><q id='HuukQ'><span id='HuukQ'><b id='HuukQ'><form id='HuukQ'><ins id='HuukQ'></ins><ul id='HuukQ'></ul><sub id='HuukQ'></sub></form><legend id='HuukQ'></legend><bdo id='HuukQ'><pre id='HuukQ'><center id='HuukQ'></center></pre></bdo></b><th id='HuukQ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HuukQ'><tfoot id='HuukQ'></tfoot><dl id='HuukQ'><fieldset id='HuukQ'></fieldset></dl></div>
        <legend id='HuukQ'><style id='HuukQ'><dir id='HuukQ'><q id='HuukQ'></q></dir></style></legend>
          <tbody id='HuukQ'></tbody>

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

            1. <tfoot id='HuukQ'></tfoot>

                  <bdo id='HuukQ'></bdo><ul id='HuukQ'></ul>
                  本文介紹了檢查用戶是否在 discord.py 中具有權限的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在為我的 discord.py 機器人創建一個踢命令.以下是 kick 命令可能的一些代碼:

                  I am making a kick command for my discord.py bot. Here is some code that the kick command might be:

                      async kick_command(self, ctx, userName: discord.User):
                        prefix_used = ctx.prefix
                        alias_used = ctx.invoked_with
                        text = msg[len(prefix_used) + len(alias_used):]
                        if discord.User permissions = "admin":
                          try:
                            kick(User)
                          except Exception as e:
                            ee = "Error: " + e
                            await ctx.send_message(content=ee)
                  

                  我很確定 if 語句和 kick(User) 是無效的語法.你能幫幫我嗎?

                  I am pretty sure the if statement and kick(User) are invalid syntax. Can you help me?

                  我的代碼:點擊這里

                  推薦答案

                  試試這個:

                  @bot.command()
                  @has_permissions(kick_members=True)  
                  async def kick(self, ctx, Member: discord.Member):
                            await bot.kick(Member)
                  
                  @kick.error
                  async def kick_error(error, ctx):
                     if isinstance(error, MissingPermissions):
                         await ctx.send("You don't have permission to do that!")
                  

                  別忘了導入 has_permissions:from discord.ext.commands import has_permissions

                  這篇關于檢查用戶是否在 discord.py 中具有權限的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)
                    <bdo id='qtCZz'></bdo><ul id='qtCZz'></ul>

                      <legend id='qtCZz'><style id='qtCZz'><dir id='qtCZz'><q id='qtCZz'></q></dir></style></legend>
                      <tfoot id='qtCZz'></tfoot>

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

                        • <i id='qtCZz'><tr id='qtCZz'><dt id='qtCZz'><q id='qtCZz'><span id='qtCZz'><b id='qtCZz'><form id='qtCZz'><ins id='qtCZz'></ins><ul id='qtCZz'></ul><sub id='qtCZz'></sub></form><legend id='qtCZz'></legend><bdo id='qtCZz'><pre id='qtCZz'><center id='qtCZz'></center></pre></bdo></b><th id='qtCZz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qtCZz'><tfoot id='qtCZz'></tfoot><dl id='qtCZz'><fieldset id='qtCZz'></fieldset></dl></div>

                            <tbody id='qtCZz'></tbody>

                            主站蜘蛛池模板: 在线日韩福利 | 一区二区在线 | 91久久久久久久久久久久久 | 亚洲欧美日韩精品久久亚洲区 | 精品一区二区av | 国产精选一区 | 日韩欧美视频在线 | 中文字幕日韩欧美一区二区三区 | 婷婷久久精品一区二区 | 日韩国产在线 | 日韩伦理一区二区 | 欧美一区精品 | 久久国内精品 | 国产一区二区三区色淫影院 | 日本中文在线视频 | 国产精品视频久久久久久 | 国产中文字幕在线观看 | www.国产.com| 日韩a在线 | 国产精品 欧美精品 | 精品少妇一区二区三区日产乱码 | 91精品国产综合久久久久久漫画 | 国产精品视频观看 | 米奇狠狠鲁 | 一区二区精品 | 国产精品久久久久久久午夜片 | 国产精品久久久久一区二区三区 | 精品国产乱码久久久久久闺蜜 | 午夜a√ | 国产一区二区在线免费观看 | 一片毛片 | 国产精品美女在线观看 | 最新日韩在线视频 | 麻豆久久 | 天天操天天射天天舔 | 欧美午夜视频 | 欧美片网站免费 | 殴美黄色录像 | 日本精品一区 | 国产精品久久国产精品 | www.啪啪.com|