F
F
falsescam2020-05-12 19:16:43
JavaScript
falsescam, 2020-05-12 19:16:43

Checking for a VK user?

There is such a function

vk.updates.hear(/-kick/i, async (context) => {
        var args = context.message.text.split(' ');
        const response = await vk.api.messages.removeChatUser({
            chat_id: 41,
            user_id: args[1]
        })
    });
}


You need to create a check for the admin, that is, take id from the array and check if it came from them, then execute the command, if not, then do not execute

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