Answer the question
In order to leave comments, you need to log in
How to make the bot send in one message?
I need the user IDs to be processed in a loop and then they are displayed in one message.
I wrote, but every id is displayed for me - a new message.
getchat = vk_session.method('messages.getChat',{'chat_id':event.chat_id, 'fields':'status', 'name_case':'nom'})['users']#[0]['id ']
for get in getchat:
print(get['id'])
vk_session.method( 'messages.send',{'chat_id': event.chat_id, 'random_id': 0, 'message': '@id' + str(get['id'])} )
Please tell me how to fix it.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question