Answer the question
In order to leave comments, you need to log in
How to mention everyone?
There is this code:
if event.text.lower() == "хс":
users = vk.messages.getConversationMembers(peer_id=event.peer_id, fields='online')
ids = [item['member_id'] for item in users["items"]]
vk.messages.send(chat_id=event.chat_id,message=ids,random_id=0)
Answer the question
In order to leave comments, you need to log in
list - list of IDs
name - text that will be written in place of the name
mes = ''
for id in list:
mes+= '[id'+str(id)+'|'+name+']'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question