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

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

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

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

          <bdo id='v6xQh'></bdo><ul id='v6xQh'></ul>
      1. 不和諧機器人等待消息

        discord bot waiting for message(不和諧機器人等待消息)

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

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

      3. <legend id='I5LWl'><style id='I5LWl'><dir id='I5LWl'><q id='I5LWl'></q></dir></style></legend>

                <tbody id='I5LWl'></tbody>

                • <bdo id='I5LWl'></bdo><ul id='I5LWl'></ul>
                  <tfoot id='I5LWl'></tfoot>
                • 本文介紹了不和諧機器人等待消息的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  因此,正如標題所示,我正在嘗試讓我的機器人響應(yīng)某個消息.因此,在用戶發(fā)送圖像后,它會回復(fù)贊美,然后如果用戶回復(fù)該消息并回復(fù)謝謝"之類的消息,機器人將繼續(xù)回復(fù)不同的消息,但我正在嘗試使用 if 語句使其響應(yīng)多個版本的謝謝".這是到目前為止的代碼:

                  So as the title suggests I'm trying to make my bot respond to a certain message. So after a user sends an image, it'll respond with a compliment, then if the user RESPONDS TO THAT MESSAGE with a message such as "thanks" the bot will then go on to respond with a different message, but I'm trying to make it respond to multiple versions of "thanks" using if statements. This is the code so far:

                  if '.png' in message.content or '.jpg' in message.content or '.jpeg' in message.content:
                              await bot.send_message(message.channel, "woah, very nice!")
                              msg = await bot.wait_for_message(author=message.author)
                              if msg:
                                  if msg.content == 'thanks':
                                      print("test") 
                                      await bot.send_message(message.channel, "hey, gotta compliment nice images right?")
                  

                  我不確定我這樣做是否正確,python shell 不打印測試并且機器人在服務(wù)器中沒有響應(yīng).

                  i'm not sure if I'm doing this right, the python shell doesn't print test and the the bot doesn't respond in the server.

                  推薦答案

                  我們可以編寫一個函數(shù)來檢查許多不同的變化,然后將該函數(shù)傳遞給 wait_for_message 作為我們的 check參數(shù).

                  We can write a function that checks for many different variations, then pass that function to wait_for_message as our check argument.

                  thanks = ['thanks', 'thank you', 'thx']
                  
                  def thanks_check(message):
                      content = message.content.lower()
                      return any(t in content for t in thanks)
                  
                  @bot.event
                  async def on_message(message):
                      content = message.content.lower()
                      if '.png' in content or '.jpg' in content or '.jpeg' in content:
                                  await bot.send_message(message.channel, "woah, very nice!")
                                  print("Waiting for test")
                                  msg = await bot.wait_for_message(author=message.author, check=thanks_check)
                                  if msg:
                                      print("test") 
                                      await bot.send_message(message.channel, "hey, gotta compliment nice images right?")
                  

                  這篇關(guān)于不和諧機器人等待消息的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?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 - 自動更改角色顏色)

                    • <tfoot id='WBqU5'></tfoot>
                      • <legend id='WBqU5'><style id='WBqU5'><dir id='WBqU5'><q id='WBqU5'></q></dir></style></legend>

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

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

                              <tbody id='WBqU5'></tbody>
                          • 主站蜘蛛池模板: 亚洲一区中文字幕 | 日韩精品一区二区三区在线播放 | 精品久久久久国产 | 亚洲精品视频免费观看 | 亚洲午夜精品视频 | 在线观看av网站永久 | 午夜精品一区二区三区在线观看 | 激情在线视频 | 日韩精品一区二区三区视频播放 | 中文字幕一区二区三区四区 | 日本中文字幕日韩精品免费 | 国产一区免费 | 国产一二三区免费视频 | 91成人免费 | 亚洲第一在线 | 久久久免费电影 | 日韩伦理电影免费在线观看 | h视频在线观看免费 | www亚洲一区| 国产视频线观看永久免费 | 国产成人综合在线 | 日本天天操 | 免费毛片网站在线观看 | 久久国产精品一区二区三区 | 亚洲精品欧美 | 久久久久久国产一区二区三区 | 一区二区在线观看av | 欧美一区二区视频 | 黑人巨大精品欧美一区二区一视频 | 男人的天堂在线视频 | 成人h电影在线观看 | 91在线视频免费观看 | 亚洲国产精品自拍 | 天天插天天操 | 免费观看毛片 | 九色国产| 久久欧美精品 | 日本高清视频在线播放 | 中文字幕11页| 欧美日韩亚洲在线 | 久久久久久国产精品 |