T
T
typical_user102020-09-14 11:43:01
Python
typical_user10, 2020-09-14 11:43:01

How to add id of participants to the list at event?

Tell me please.

I have a code that, when a certain participant enters, performs some action on him. But the problem is that if I want to add, for example, 10 more variables to get specific ids, then I get dirt. Is it possible somehow to put all these id in the list, and then somehow get them?

Thank you.

@client.event
async def on_member_join(message):
        user0 = message.guild.get_member(...) # id
        user1 = message.guild.get_member(...) # id
        for m in message.guild.members:
            if m == user0:
                ... # команда
            if m == user1:
                ... # команда

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question