久久久久久久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 機器人工作正常,現(xiàn)在它不會發(fā)送消息

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

          <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 機器人工作正常,現(xiàn)在它不會發(fā)送消息的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

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

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

                  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 服務(wù)器中有 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) 中,有一些關(guān)于 Intents 的更新.Intents 類似于權(quán)限,你必須定義它來獲取頻道、成員和一些事件等.你必須在定義 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)
                  

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

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

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

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

                  相關(guān)文檔推薦

                  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(如何在不重復(fù)導(dǎo)入頂級名稱的情況下構(gòu)造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(分發(fā)帶有已編譯動態(tài)共享庫的 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高清 | 韩日一区二区 | 日韩欧美国产成人一区二区 | 国内91在线 | 欧美啪啪网站 | 国产97人人超碰caoprom | 久久国产精品一区二区 | 成人美女免费网站视频 | 一级免费毛片 | 亚洲色图综合 | 久热国产在线 | 精品伊人久久 | aaa综合国产| 欧美激情国产精品 | 一区二区三区高清 | 久久久视频在线 | 欧美日韩黄色一级片 | 精品视频在线免费观看 | 国产日韩精品一区二区三区 | 自拍视频在线观看 | 日韩精品在线观看免费 | 色噜噜色综合 | 欧美a级网站 | 中文字幕在线观看 | 91在线区| 亚洲精品国产偷自在线观看 | 国产精品久久久久久久一区二区 | 精品久久久久一区二区国产 | av看片网| 黄色毛片视频 | 日韩中文在线观看 | 日韩精品一区二区三区中文在线 | 精品国产乱码久久久久久88av | 久久久av | 免费一级做a爰片久久毛片潮喷 | www.国产一区 | 亚洲在线视频 | www.com久久久 | 亚洲97| 久久久精品一区二区三区 |