J
J
john_santos2020-09-22 16:49:15
Python
john_santos, 2020-09-22 16:49:15

I can’t make the /kick command in the VK Python bot, what should I do?

if event.type == VkBotEventType.MESSAGE_NEW or event.type == VkEventType:
        response = str('')
        if response.split('')[0] == '/kick':
            if event.from_chat:
                vk.messages.removeChatUser(
                    chat_id=event.chat_id,
                    user_id=response.split(' ')[1]
                )

I'm trying to write a code for a kick, as a result, when I write the /kick command in a conversation, the code gives an error: ValueError: empty separator

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