Answer the question
In order to leave comments, you need to log in
Problem with vkbottle?
Hello. I have such a problem, if I write text = 'test' in the decorator, and
if I write Test, not test, then it will not respond. How to fix this without using text = ['Test', 'test']?
here is a sample code:
import asyncio
from vkbottle.bot import Bot, Message
bot = Bot("токен")
@bot.on.private_message(text="test")
async def hi_handler(message: Message):
users_info = await bot.api.users.get(message.from_id)
await message.answer("Привет, {}".format(users_info[0].first_name))
bot.run_forever()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question