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

    <tfoot id='jO4JX'></tfoot>

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

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

      2. discord.py 機器人可以不區分大小寫嗎?

        Can a discord.py bot not be case sensitive?(discord.py 機器人可以不區分大小寫嗎?)

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

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

                  本文介紹了discord.py 機器人可以不區分大小寫嗎?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我現在正在制作一個不和諧機器人,如果我使用大寫字母/不使用大寫字母,它不會響應.機器人有沒有辦法檢測消息,即使它們是大寫/小寫的?機器人還有沒有辦法對空格做同樣的事情(如果我不小心忘記放空格,或者不小心將兩個單詞合并在一起......)?

                  I'm making a discord bot right now, and it won't respond if I use capitals/don't use capitals. Is there a way for a bot to detect messages even if they're capital/lowercase? Is there also a way for a bot to be able to do the same with spaces (if I accidentally forget to put a space, or accidentally merge two words together...)?

                  還是我必須對 if 語句進行無窮無盡的跟蹤?

                  Or do I have to make an endless trail of if statements?

                  推薦答案

                  假設你在 msg 變量中得到你的消息,那么如果你使用 msg.lower()您將獲得小寫版本的響應,您可以檢查它以查看命令是什么.

                  assuming you get your message in the msg variable, then if you use msg.lower() you'll get the lowercase version of the response and you can check on that to see what the command was.

                  另外,運行 msg.replace(' ', '') 將創建一個刪除所有空格的值,您可以檢查此變量的相應值而不是原始值.

                  also, running msg.replace(' ', '') would create a value where all spaces are removed, and you can check the corresponding value of this variable instead of the original one.

                  例如:

                  msg = 'HeLlO wOrLd'
                  print(msg.lower().replace(' ', ''))
                  >> helloworld
                  

                  假設這是一個命令行界面,我真的建議您遵循內置 argparse 庫中的指南.

                  assuming this is a command line interface, I truly suggest you follow the guidelines in the builtin argparse library.

                  請參見此處:https://docs.python.org/3.3/library/argparse.html

                  這篇關于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='gze2Q'><tr id='gze2Q'><dt id='gze2Q'><q id='gze2Q'><span id='gze2Q'><b id='gze2Q'><form id='gze2Q'><ins id='gze2Q'></ins><ul id='gze2Q'></ul><sub id='gze2Q'></sub></form><legend id='gze2Q'></legend><bdo id='gze2Q'><pre id='gze2Q'><center id='gze2Q'></center></pre></bdo></b><th id='gze2Q'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gze2Q'><tfoot id='gze2Q'></tfoot><dl id='gze2Q'><fieldset id='gze2Q'></fieldset></dl></div>
                      <tfoot id='gze2Q'></tfoot>

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

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

                            <tbody id='gze2Q'></tbody>

                            <bdo id='gze2Q'></bdo><ul id='gze2Q'></ul>
                            主站蜘蛛池模板: 欧美成人综合 | 黄色网址在线免费播放 | 91se在线| 欧美日韩久久精品 | 久久久久久久久中文字幕 | 成人国产免费视频 | 在线观看亚洲精品视频 | 在线国产一区二区 | 亚洲av一级毛片 | 日韩第一页 | 伊人网站| 久草精品视频 | 99福利视频 | 亚洲精品一区二区三区蜜桃久 | www.日韩在线 | 在线播放第一页 | 伊人看片| 国产成人在线一区二区 | 男女视频91 | 国产综合第一页 | 国户精品久久久久久久久久久不卡 | 国产9久 | 日本精品一区二区三区在线观看视频 | 中国91av | 精品视频在线免费观看 | 视频一区二区国产 | 国产视频在线观看一区二区三区 | 国产亚洲精品久久久久动 | 午夜小视频在线播放 | 中文字幕av在线播放 | 国产精品免费看 | 精品亚洲国产成av人片传媒 | 91视视频在线观看入口直接观看 | 国产最好的av国产大片 | 日韩伦理一区二区三区 | 正在播放国产精品 | 日韩精品免费在线 | 中文字幕视频在线观看 | 在线视频中文字幕 | 欧美5区| 欧美高清视频在线观看 |