N
N
noob2222019-02-08 14:33:26
Python
noob222, 2019-02-08 14:33:26

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

1 answer(s)
E
enot_yoyo, 2019-02-08
@enot_yoyo

print([get['id'] for get in getchat])

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question