Answer the question
In order to leave comments, you need to log in
Discord.py How to output members on a server?
There is a code, when activated, the bot sends all server participants, spamming to the channel, because each participant has his own message, but how to make the output in one message?
@client.event
async def on_message( message ):
if message.content.startswith('member'):
for guild in client.guilds:
for member in guild.members:
await message.channel.send(member)
Answer the question
In order to leave comments, you need to log in
@client.event
async def on_message( message ):
if message.content.startswith('member'):
await message.channel.send('\n'.join(['\n'.join([member for member in guild.members]) for guild in client.guilds]))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question