D
D
DADDDADA2021-07-22 14:54:27
Python
DADDDADA, 2021-07-22 14:54:27

Why doesn't the lower method work in vkbottle?

Hello! For some reason I can't use the lower method in VKBOTTLE.

from vkbottle.bot import Bot, Message

bot = Bot('token')
@bot.on.message(text='start', lower=True)
async def bdate(ans: Message):
await ans("hello")

bot .run_forever()

KeyError: 'lower'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WolfInChains, 2021-07-22
@DADDADADA

This is an example for old versions of the bottle, in new ones it looks like this
bot.labeler.vbml_ignore_case = True

D
Dmitry, 2021-07-22
@LazyTalent

Because such a custom_rule is not defined by default. If you want to use lower, then you need to define this rule first.
https://github.com/timoniq/vkbottle/blob/681189187...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question