C
C
cyxarick2020-09-23 14:27:43
Python
cyxarick, 2020-09-23 14:27:43

How to make vk bot accept arguments?

Command example:

!test Hello world(вместо хелло ворлд подставить любое слово)
Бот:Hello world

vk_api library

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2020-09-23
@cyxarick

if answer.find("!test") > -1 : answer = answer.replace("!test ", "")

Now there will be an argument in the answer variable, you process it further.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question