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

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

    1. <small id='ZQoZy'></small><noframes id='ZQoZy'>

        <legend id='ZQoZy'><style id='ZQoZy'><dir id='ZQoZy'><q id='ZQoZy'></q></dir></style></legend>

        <tfoot id='ZQoZy'></tfoot>

        discord.py 重寫 |為我的命令出錯

        discord.py rewrite | Making errors for my commands(discord.py 重寫 |為我的命令出錯)

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

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

                <tbody id='OkLot'></tbody>
              • <bdo id='OkLot'></bdo><ul id='OkLot'></ul>

                • 本文介紹了discord.py 重寫 |為我的命令出錯的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  現在我完成了我的審核命令 [大部分],我正在嘗試添加錯誤.我已經犯了請指定一個成員"錯誤,但我無法讓機器人說這個成員不存在"輸入無效名稱時.

                  Now that I finished my moderation commands [mostly], I am trying to add errors in. I already made the "please specify a member" error, but I cannot manage to make the bot say "this member does not exist" when an invalid name is input.

                  @client.command(name='kick',
                              brief='Kicks user',
                              aliases=['Kick'],
                              pass_context=True)
                  async def kick(context, member:discord.Member=None):
                  # Errors
                  if not member:
                      await context.send('Please specify a member.')
                      return
                  # Actual Kicking
                  if context.author.guild_permissions.kick_members == True:
                      await member.kick()
                      await context.send(f"{member.mention} was kicked ")
                  else:
                      await context.send(context.message.author.mention + ", you don't have permission")
                  

                  這是我的命令之一,一切正常.如果該成員顯然不存在,我想要一個顯示找不到用戶"的錯誤.例如,k!kick ijhguiserb 會讓機器人說未找到成員",而不是在 shell 中給我一個錯誤.

                  This is one of my commands, where everything is working. I would like an error which says "User not found" if the member, obviously, doesn't exist. For example, k!kick ijhguiserb would make the bot say, "Member not found," rather than giving me an error in the shell.

                  我們將不勝感激,謝謝!

                  Help would be appreciated, thanks!

                  推薦答案

                  你必須定義一個 錯誤處理程序來處理ConversionError

                  You'll have to define an error handler to handle the ConversionError

                  from discord.ext.commands import ConversionError
                  
                  @kick.error
                  async def kick_error(ctx, error):
                      if isinstance(error, (ConversionError, BadArgument)):
                          await ctx.send("Member not found")
                      else:
                          raise error
                  

                  這篇關于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 - 自動更改角色顏色)
                      <i id='qdBVO'><tr id='qdBVO'><dt id='qdBVO'><q id='qdBVO'><span id='qdBVO'><b id='qdBVO'><form id='qdBVO'><ins id='qdBVO'></ins><ul id='qdBVO'></ul><sub id='qdBVO'></sub></form><legend id='qdBVO'></legend><bdo id='qdBVO'><pre id='qdBVO'><center id='qdBVO'></center></pre></bdo></b><th id='qdBVO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='qdBVO'><tfoot id='qdBVO'></tfoot><dl id='qdBVO'><fieldset id='qdBVO'></fieldset></dl></div>
                      • <bdo id='qdBVO'></bdo><ul id='qdBVO'></ul>
                        <tfoot id='qdBVO'></tfoot>
                        • <legend id='qdBVO'><style id='qdBVO'><dir id='qdBVO'><q id='qdBVO'></q></dir></style></legend>

                              <tbody id='qdBVO'></tbody>

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

                          1. 主站蜘蛛池模板: 99热视| 久久久毛片 | 久国久产久精永久网页 | 91精品国产91久久久久游泳池 | 欧美日韩国产在线观看 | 91看片免费 | 婷婷丁香激情 | 一区二区三区四区在线 | 国产成人精品午夜视频免费 | 日本二区在线观看 | 国产午夜精品一区二区三区嫩草 | 国产亚韩 | 精品亚洲一区二区三区四区五区高 | 亚洲福利网 | 天天操天天干天天爽 | 亚洲欧洲中文日韩 | 亚洲福利精品 | 国产成人高清视频 | 亚洲自拍偷拍欧美 | 成人小视频在线观看 | 日韩欧美精品在线播放 | 国产高清久久 | 午夜爱爱网 | 国产精品久久久久久久久久久免费看 | 久久精品小视频 | 午夜爽爽男女免费观看hd | 免费一二区 | 91精品国产91久久久久久吃药 | 青青操91| 日韩一区二区三区视频 | 午夜精品一区二区三区在线视频 | 欧美日韩一区二区三区在线观看 | 亚洲欧美在线一区 | 91视频在线看 | 91精品国产综合久久久久久 | 琪琪午夜伦伦电影福利片 | 日本超碰 | 亚洲精品一区二区三区免 | 欧美精品一区二区三区视频 | 亚洲一区精品在线 | 久久综合av |