R
R
Roma2021-06-09 17:05:04
Python
Roma, 2021-06-09 17:05:04

Where should I insert .lower() so that the bot accepts any letter case?

Hello, I have some difficulties with aiogram.
Where should I insert .lower() so that the bot accepts any letter case?

import logging
from aiogram import Bot, Dispatcher, executor, types

@dp.message_handler(text = ['привет'])
async def process_startcommand(message: types.Message):
    await message.answer('здравствуйте')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Krostelev, 2021-06-09
@POMA0197263

@dp.message_handler(lambda message: message.text.lower() == 'привет')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question