久久久久久久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>

                            主站蜘蛛池模板: 亚洲午夜精品久久久久久app | 国产色婷婷精品综合在线播放 | 99精品久久| 中文字幕在线一区二区三区 | 欧美激情久久久 | 日韩视频在线免费观看 | 亚洲精选一区二区 | 精精久久 | 精品在线观看一区二区 | 日韩免费福利视频 | 午夜欧美一区二区三区在线播放 | 国产精品成人久久久久 | www.玖玖玖| 国产精品久久国产精品 | 97avcc| 国产精品亚洲一区二区三区在线 | 欧美一区二区三区在线观看视频 | 中文字幕免费视频 | 精品国产乱码久久久久久蜜退臀 | 欧美精品综合 | 亚洲一区二区电影网 | 黄在线免费观看 | 欧美成年黄网站色视频 | 日韩国产欧美一区 | 久综合 | 综合一区二区三区 | 亚洲精品国产a久久久久久 中文字幕一区二区三区四区五区 | 国产精久久久久久久妇剪断 | 精品国产乱码久久久久久88av | 亚洲va国产日韩欧美精品色婷婷 | 亚洲欧美在线一区 | 日韩二三区 | 粉嫩av在线 | 午夜精品久久久久久久久久久久 | 国产91色在线 | 亚洲 | 九九精品在线 | 亚洲福利一区 | 日本一区二区三区免费观看 | 亚洲乱码一区二区三区在线观看 | www.狠狠操| 欧美日韩在线成人 |