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

      • <bdo id='Ae6lb'></bdo><ul id='Ae6lb'></ul>

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

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

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

        <tfoot id='Ae6lb'></tfoot>
      1. Mass DM 機器人工作正常,現在它不會發送消息

        Mass DM bot was working fine and now it wont send messages(Mass DM 機器人工作正常,現在它不會發送消息)

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

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

                    <tbody id='T9qld'></tbody>
                  <tfoot id='T9qld'></tfoot>
                  本文介紹了Mass DM 機器人工作正常,現在它不會發送消息的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  幾個月前,我和一個叫 Diggy 的人(來自這個社區)為我和一些朋友在 BlackDesert Online 上運行的公會編寫了一個 MassDM 機器人.它工作得很好,直到 10 月 28 日停止發送 DM.一開始它只是將 DM 發送給一些具有指定角色的成員(105 個中的 3 個)

                  i coded a MassDM bot with a guy called Diggy (from this community) few months ago, for a guild that I and some friends run on BlackDesert Online. It was working just fine till October 28th when stopped sending the DMs. At the begining it just sent the DM to some members that had the specified role (3 out of 105)

                  現在我更新了 dicord.py,它不會將消息發送給任何人(有時只發送給其中一個,或者兩個...有點隨機)...

                  and now that I updated dicord.py, it sends the message to no one (and sometimes to just one of them, or two... is kinda random)...

                  discord 服務器中有 105 個用戶,角色為Miembros"...

                  There are 105 users in that discord server with the role "Miembros"...

                  這里是代碼...

                  bot = commands.Bot(command_prefix="+", case_insensitive=True)
                  bot.remove_command("help")
                   
                  @commands.has_permissions(administrator=True)
                  @bot.command()
                  async def announce(ctx, role: discord.Role, *, msg):
                      if ctx.channel.id == 708458959991865354:
                          members = [m for m in ctx.guild.members if role in m.roles]
                          count = 0
                          for m in members:
                              try:
                                  await m.send(msg)
                                  await ctx.send(f":white_check_mark: Mensaje enviado a {m}")
                                  count += 1
                              except:
                                  await ctx.send(f":x: No se pudo enviar el mensaje a {m}!")
                          await ctx.send(f"Hecho! {count} miembro{'' if count == 1 else 's'} notificados de un total de {len(members)}")
                      else:
                          await ctx.send("Este comando no esta permitido en este canal.")
                  
                  bot.run("...")
                  

                  一直在閱讀文檔并試圖了解如何解決它,但我想我對 python 的了解很差.感謝您的幫助.

                  Been reading the documentation and trying to understand how to solve it, but I guess my knowledge in python is pretty poor. Thanks for the help.

                  推薦答案

                  我不確定,但您的問題可能是因為 Intents.在新版本的 discord.py(1.5.x) 中,有一些關于 Intents 的更新.Intents 類似于權限,你必須定義它來獲取頻道、成員和一些事件等.你必須在定義 bot = discord.Bot(prefix='') 之前定義它.p>

                  I'm not sure but your problem is probably because of Intents. In the new version of discord.py(1.5.x), there're some updates about Intents. Intents are similar to permissions, you have to define it to get channels, members and some events etc. You have to define it before defining the bot = discord.Bot(prefix='').

                  import discord
                  
                  intents = discord.Intents().all()
                  bot = discord.Bot(prefix='', intents=intents)
                  

                  如果你想獲取更多關于 Intents 的信息,可以查看 API 參考.

                  If you want to get more information about Intents, you can look at the API References.

                  這篇關于Mass DM 機器人工作正常,現在它不會發送消息的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)
                      <legend id='HjmBg'><style id='HjmBg'><dir id='HjmBg'><q id='HjmBg'></q></dir></style></legend>
                    • <i id='HjmBg'><tr id='HjmBg'><dt id='HjmBg'><q id='HjmBg'><span id='HjmBg'><b id='HjmBg'><form id='HjmBg'><ins id='HjmBg'></ins><ul id='HjmBg'></ul><sub id='HjmBg'></sub></form><legend id='HjmBg'></legend><bdo id='HjmBg'><pre id='HjmBg'><center id='HjmBg'></center></pre></bdo></b><th id='HjmBg'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HjmBg'><tfoot id='HjmBg'></tfoot><dl id='HjmBg'><fieldset id='HjmBg'></fieldset></dl></div>

                      <tfoot id='HjmBg'></tfoot>

                        <tbody id='HjmBg'></tbody>

                        <bdo id='HjmBg'></bdo><ul id='HjmBg'></ul>
                        1. <small id='HjmBg'></small><noframes id='HjmBg'>

                            主站蜘蛛池模板: 免费观看av | 欧美一区二区免费 | 久久黄色网 | 国产一区福利 | 一级二级毛片 | 国产一级在线 | 国产黄色三级 | 国产日韩欧美 | av资源在线 | 少妇av在线 | 免费观看全黄做爰视频 | 亚洲小视频在线观看 | 99在线观看视频 | 日韩在线综合 | 亚洲激情综合网 | 国产午夜视频在线观看 | av观看免费| 国产在线不卡视频 | 久久伊人热| 日本黄色免费视频 | 精品日韩一区二区三区 | 一区二区美女 | 亚洲国产成人91精品 | 久久久婷婷 | 免费在线看a | 欧美激情综合网 | 国产一区二区三区久久 | 国产欧美一区二区 | 欧美国产日韩一区二区 | 成人在线免费观看网站 | 亚洲一区自拍 | 免费一区二区视频 | 免费av网站在线观看 | 中文字幕亚洲精品 | 日韩黄色片 | 深夜福利网址 | 中文字幕第三页 | 久久免费精品视频 | 青青草国产成人av片免费 | 亚洲欧美精品 | 老司机精品福利视频 |