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

    • <bdo id='YAYrE'></bdo><ul id='YAYrE'></ul>
    1. <legend id='YAYrE'><style id='YAYrE'><dir id='YAYrE'><q id='YAYrE'></q></dir></style></legend>

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

      <tfoot id='YAYrE'></tfoot>
      <i id='YAYrE'><tr id='YAYrE'><dt id='YAYrE'><q id='YAYrE'><span id='YAYrE'><b id='YAYrE'><form id='YAYrE'><ins id='YAYrE'></ins><ul id='YAYrE'></ul><sub id='YAYrE'></sub></form><legend id='YAYrE'></legend><bdo id='YAYrE'><pre id='YAYrE'><center id='YAYrE'></center></pre></bdo></b><th id='YAYrE'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='YAYrE'><tfoot id='YAYrE'></tfoot><dl id='YAYrE'><fieldset id='YAYrE'></fieldset></dl></div>
      1. 如果消息被編輯,反發(fā)誓系統(tǒng)不起作用

        Anti-swear system not working if message is edited(如果消息被編輯,反發(fā)誓系統(tǒng)不起作用)

          <small id='2u6Sr'></small><noframes id='2u6Sr'>

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

              <tfoot id='2u6Sr'></tfoot>

              <legend id='2u6Sr'><style id='2u6Sr'><dir id='2u6Sr'><q id='2u6Sr'></q></dir></style></legend>
                  <bdo id='2u6Sr'></bdo><ul id='2u6Sr'></ul>
                    <tbody id='2u6Sr'></tbody>

                  本文介紹了如果消息被編輯,反發(fā)誓系統(tǒng)不起作用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  基本上,如果您說的不是臟話,然后將消息編輯成臟話,機(jī)器人將不會檢測到它.我該如何解決?這是我的代碼:

                  Basically if you say something that's not a swear word but then edit the message into a swear word, the bot will not detect it. How do I fix this? Here's my code:

                  @client.event
                  async def on_message(message):
                      if message.author.bot:
                          return
                      for badword in file:
                          if badword in message.content.lower():
                              await message.delete()
                              warnMessage = f"Hey {message.author.mention}! Don't say that!"
                              await message.channel.send(warnMessage, delete_after=5.0)
                              print(f"{message.author.name} tried saying: {badword}")
                              channel = client.get_channel(836232733126426666)
                              
                              embed = discord.Embed(title=f"Someone tried to swear!", colour=0x2D2D2D)
                              embed.add_field(name="Person who tried to swear:", value=f"{message.author.name}", inline=False)
                              embed.add_field(name="What they tried to say:", value=f"{badword}", inline=False)
                              embed.add_field(name="Channel they tried to swear in:", value=f"<#{message.channel.id}>", inline=False)
                              
                              await channel.send(embed=embed)
                              return
                              await client.process_commands(message)
                      if message.content.startswith('Jason derulo'):
                          await message.channel.send('Wiggle wiggle wiggle')
                      if message.content.startswith('fast'):
                          await message.channel.send('She a runner she a track star')
                      await client.process_commands(message)
                  

                  推薦答案

                  您可以為此使用 on_message_edit 事件,并使用您在 on_message 事件(只要記住使用 after 參數(shù)而不是 message)

                  You can use the on_message_edit event for that and use the same logic you're using in the on_message event (just remember to use the after arg instead of message)

                  @client.event
                  async def on_message_edit(before, after):
                      for badword in file:
                          if badword in after.content.lower():
                              await after.delete()
                              warnMessage = f"Hey {after.author.mention}! Don't say that!"
                              await after.channel.send(warnMessage, delete_after=5.0)
                              print(f"{message.author.name} tried saying: {badword}")
                              channel = client.get_channel(836232733126426666)
                              
                              embed = discord.Embed(title=f"Someone tried to swear!", colour=0x2D2D2D)
                              embed.add_field(name="Person who tried to swear:", value=f"{message.author.name}", inline=False)
                              embed.add_field(name="What they tried to say:", value=f"{badword}", inline=False)
                              embed.add_field(name="Channel they tried to swear in:", value=f"<#{message.channel.id}>", inline=False)
                              
                              return await channel.send(embed=embed)
                  

                  參考:

                  • on_message_edit
                  • 這篇關(guān)于如果消息被編輯,反發(fā)誓系統(tǒng)不起作用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)

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

                            <bdo id='E3JXv'></bdo><ul id='E3JXv'></ul>
                            <tfoot id='E3JXv'></tfoot>
                              <tbody id='E3JXv'></tbody>
                            主站蜘蛛池模板: 99一级毛片| 日韩综合| 精品视频一区二区三区在线观看 | 国产精品一区二区三区在线 | 一级片毛片 | 九九伊人sl水蜜桃色推荐 | 日韩一二区 | 国产婷婷综合 | 国产成人免费视频网站高清观看视频 | 亚洲精品成人 | 国产日产精品一区二区三区四区 | 精品久久香蕉国产线看观看亚洲 | 亚洲国产第一页 | 中文字幕 在线观看 | 日日操夜夜操天天操 | 久久久蜜桃一区二区人 | 国产在线精品一区二区三区 | 尤物视频在线免费观看 | 正在播放国产精品 | 涩爱av一区二区三区 | 九九热九九| 国产一区亚洲二区三区 | 国产高清视频 | 精品福利一区 | 在线一级片 | 日韩精品一二三 | 欧美日韩淫片 | 欧美日韩视频在线第一区 | 看亚洲a级一级毛片 | 一区在线视频 | 国产精品色婷婷久久58 | www.成人在线视频 | 国内精品视频一区二区三区 | 一区二区三区免费 | 狠狠操婷婷 | 国产精品美女久久久久久免费 | www国产成人免费观看视频,深夜成人网 | 成人网av | 日韩欧美国产一区二区 | 91精品一区二区三区久久久久 | 国产精品一区二区三区四区 |