Answer the question
In order to leave comments, you need to log in
How to make something in AIOGRAM.KeyboardButton react not to "/command", but react to "command" without "/"?
Hello!
Tell me how to make the bot react not to /command, but so that I can send without it at all and the bot recognizes commands in the telegram chat.
Tried: via
@dp.message_handler(lambda message: 'Текст ' in message.text)
async def test(message: types.Message):
await bot.send_message(message.from_user.id,reply_markup=keybord)
Answer the question
In order to leave comments, you need to log in
@dp.message_handler(text='Текст')
async def test(message: types.Message):
await bot.send_message(message.from_user.id,reply_markup=keybord)
@dp.message_handler(content_type=['text'])
async def test(message: types.Message):
if message.text = "Текст":
await bot.send_message(message.from_user.id,reply_markup=keybord)
await bot.send_message(message.from_user.id,reply_markup=keybord)
await message.answer("Хмм", reply_markup=keybord )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question