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

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

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

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

        如何在 discord.py 中获取所有成员列表?

        时间:2023-10-11
          • <bdo id='xFCbb'></bdo><ul id='xFCbb'></ul>
            <legend id='xFCbb'><style id='xFCbb'><dir id='xFCbb'><q id='xFCbb'></q></dir></style></legend>

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

                <tfoot id='xFCbb'></tfoot>
              • <small id='xFCbb'></small><noframes id='xFCbb'>

                  <tbody id='xFCbb'></tbody>

                • 本文介绍了如何在 discord.py 中获取所有成员列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  @client.command() 
                  async def members_info(ctx):    
                      server_members = ctx.guild.members 
                      data = "
                  ".join([member.name for member in server_members if "test" in member.roles])
                      embed = discord.Embed(title = f'Участники сервера', description = f"{data}", color = discord.Color.purple())
                  

                  只输出带有标题和颜色的空嵌入消息,没有描述我不知道我该怎么办-_-

                  Output just empty embed message with title and color without description I dont know what i supposed to do -_-

                  推荐答案

                  您可能缺少 members 意图.这意味着成员不会加载到缓存中,除非您执行直接 HTTP 请求.启用:

                  It is likely that you are missing the members intent. This means members are not loaded in cache unless you do a direct HTTP request. To enable:

                  首先在

                  第二次订阅discord.py:

                  Secondly subscribe in discord.py:

                  import discord
                  from discord.ext import commands
                  
                  intents = discord.Intents.default()
                  intents.members = True
                  bot = commands.Bot(intents=intents, ...)
                  

                  这篇关于如何在 discord.py 中获取所有成员列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Python discord bot 离开语音频道 下一篇:运行我的 discord.py 机器人时在 client.run('token

                  相关文章

                  最新文章

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

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

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

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