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

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

  • <small id='DPFfu'></small><noframes id='DPFfu'>

      <tfoot id='DPFfu'></tfoot>
      <legend id='DPFfu'><style id='DPFfu'><dir id='DPFfu'><q id='DPFfu'></q></dir></style></legend>
      • <bdo id='DPFfu'></bdo><ul id='DPFfu'></ul>

        使用 Python Discord 機器人刪除消息?

        Delete Messages with Python Discord bot?(使用 Python Discord 機器人刪除消息?)
        <legend id='kIjNw'><style id='kIjNw'><dir id='kIjNw'><q id='kIjNw'></q></dir></style></legend>
          • <bdo id='kIjNw'></bdo><ul id='kIjNw'></ul>
            • <i id='kIjNw'><tr id='kIjNw'><dt id='kIjNw'><q id='kIjNw'><span id='kIjNw'><b id='kIjNw'><form id='kIjNw'><ins id='kIjNw'></ins><ul id='kIjNw'></ul><sub id='kIjNw'></sub></form><legend id='kIjNw'></legend><bdo id='kIjNw'><pre id='kIjNw'><center id='kIjNw'></center></pre></bdo></b><th id='kIjNw'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='kIjNw'><tfoot id='kIjNw'></tfoot><dl id='kIjNw'><fieldset id='kIjNw'></fieldset></dl></div>

              • <tfoot id='kIjNw'></tfoot>

                    <tbody id='kIjNw'></tbody>

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

                1. 本文介紹了使用 Python Discord 機器人刪除消息?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試制作一個 Python Discord Bot,它首先可以刪除頻道中的消息.我希望它以終結者 3 為主題,所以它會從用戶說天網開始,然后機器人要求激活 Y 或 N?當用戶輸入Y時,它會刪除頻道中的所有消息,如果用戶輸入N,它會說審判日是不可避免的.任何幫助將不勝感激.

                  I'm trying to make a Python Discord Bot that firstly can delete messages within a channel. I wanted it to be Terminator 3 themed so it would start out by the user saying Skynet then the bot asks to activate Y or N? and when the user types Y it would delete all the messages in the channel if the user typed N it would say judgment day is inevitable. any help would be greatly appreciated.

                  import discord
                  from discord.ext.commands import Bot
                  from discord.ext import commands
                  import asyncio
                  
                  token = 'Token'
                  
                  Client = discord.Client()
                  client = commands.Bot(command_prefix = '!')
                  
                  
                  @client.event
                    async def on_ready():
                       print("Skynet Online")
                  
                  @client.event
                  
                    async def on_message(message):
                      if message.content == 'skynet':
                          await client.send_message(message.channel, 'Execute Y/N?')
                  
                  @asyncio.coroutine
                    async def delete_messages(messages):
                      if message.content == 'Y':
                          await client.delete_messages()
                  
                  
                  client.run('Token')
                  

                  推薦答案

                  import discord
                  from discord.ext.commands import Bot
                  from discord.ext import commands
                  import asyncio
                  
                  @has_permissions(manage_messages=True, read_message_history=True)
                  @bot_has_permissions(manage_messages=True, read_message_history=True)
                  async def purge(ctx, limit: int = 100, user: d.Member = None, *, matches: str = None):
                      """Purge all messages, optionally from ``user``
                      or contains ``matches``."""
                      logger.info('purge', extra={'ctx': ctx})
                      def check_msg(msg):
                          if msg.id == ctx.message.id:
                              return True
                          if user is not None:
                              if msg.author.id != user.id:
                                  return False
                          if matches is not None:
                              if matches not in msg.content:
                                  return False
                          return True
                      deleted = await ctx.channel.purge(limit=limit, check=check_msg)
                      msg = await ctx.send(i18n(ctx, 'purge', len(deleted)))
                      await a.sleep(2)
                      await msg.delete()
                  

                  即刪除消息的命令

                  這篇關于使用 Python Discord 機器人刪除消息?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 - 自動更改角色顏色)
                  <legend id='2HIKL'><style id='2HIKL'><dir id='2HIKL'><q id='2HIKL'></q></dir></style></legend>

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

                    1. <tfoot id='2HIKL'></tfoot>

                        <tbody id='2HIKL'></tbody>

                        • <i id='2HIKL'><tr id='2HIKL'><dt id='2HIKL'><q id='2HIKL'><span id='2HIKL'><b id='2HIKL'><form id='2HIKL'><ins id='2HIKL'></ins><ul id='2HIKL'></ul><sub id='2HIKL'></sub></form><legend id='2HIKL'></legend><bdo id='2HIKL'><pre id='2HIKL'><center id='2HIKL'></center></pre></bdo></b><th id='2HIKL'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2HIKL'><tfoot id='2HIKL'></tfoot><dl id='2HIKL'><fieldset id='2HIKL'></fieldset></dl></div>
                            <bdo id='2HIKL'></bdo><ul id='2HIKL'></ul>
                          • 主站蜘蛛池模板: 伊人网在线播放 | 国产精品区一区二区三区 | 久久99精品视频 | 午夜av电影 | 亚洲乱码一区二区 | 国产精品免费播放 | 国产成人综合av | 在线观看亚洲精品视频 | 久久久夜色精品亚洲 | 天天碰夜夜操 | 一区天堂| 国产麻豆一区二区三区 | 亚洲自拍偷拍av | 在线亚州| 国产精品久久午夜夜伦鲁鲁 | 国产十日韩十欧美 | 国产无人区一区二区三区 | 亚洲精品欧洲 | 日韩一区二区在线观看视频 | 久久狼人天堂 | 欧美一级二级在线观看 | 亚洲精品电影网在线观看 | 99国产精品视频免费观看一公开 | 国产成人精品999在线观看 | 精品视频一区二区 | 国产精品视频在线播放 | 久久久久国产精品午夜一区 | 性一交一乱一透一a级 | av网址在线 | 黄页网址在线观看 | 91精品久久久久久久久久小网站 | 久久久久久久久久久久久久国产 | 久久99国产精品 | 欧美1区2区 | 午夜在线视频一区二区三区 | 天天操天天干天天爽 | 国产精品一区二区在线免费观看 | 久久se精品一区精品二区 | 国产精品福利视频 | 懂色av一区二区三区在线播放 | 中文字幕一区二区三区不卡在线 |