R
R
RDSKUser2021-08-25 16:04:07
Python
RDSKUser, 2021-08-25 16:04:07

Problems with getting a list of server members, how to fix it?

Here is the code, the command outputs only one user. Please help.

@client.command()
async def members(ctx):
    while True:
        for guild in client.guilds:
            for member in guild.members:
                await ctx.send(member)
        break

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-08-25
@RDSKUser

Displays only a bot? In the bot constructor, you need to pass additional Intents
https://discordpy.readthedocs.io/en/latest/intents.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question