Answer the question
In order to leave comments, you need to log in
How to make a command in a bot?
Hello. Help make a team that will choose a random name and person ID.
module - vk_api
Answer the question
In order to leave comments, you need to log in
In conversation or where?
https://vk.com/dev/messages.getConversationMembers
An example with a name. From there, you can pull out the ID
users = vk.method("messages.getConversationMembers", {("peer_id": event.obj.peer_id})["profiles"]
user = random.choice(users)["first_name"]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question