R
R
Rusiantvso2020-05-06 12:17:16
Python
Rusiantvso, 2020-05-06 12:17:16

Excluding a user from a conversation with VkBotLongPoll?

please help me how to order a bot to exclude a user via longpoll
example : kick @userid

longpoll = VkBotLongPoll(vk_session, idgrup)
for event in longpoll.listen():
    if event.type == VkBotEventType.MESSAGE_NEW:
        if text.lower() == 'кик':
            vk.messages.removeChatUser(
                chat_id=event.chat_id,
                member_id=user,
            )

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