Answer the question
In order to leave comments, you need to log in
How to cut the VK page ID from the command using a regex (Python)?
vk_api library
if event.type == VkBotEventType.MESSAGE_NEW and event.obj.text.lower() == "/stats" or event.obj.text.lower() == "/статистика":
Answer the question
In order to leave comments, you need to log in
You can do it without regex, something like this
command = '/stats 1'
vk_id = command.split(" ")[1]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question