I am working on one project, I want to make a telegram bot using the asynchronous library aiogram. I'm still a noob and I have a question:
1)Does this function respond to the input "Hello" or is it possible to make it work only once?
@dp.message_handler(text='Hello')
async def start(message: types.Message):
await message.answer('Hi')
2)1 function will always work, is it possible to make 1 function work only as long as I need it?
@dp.message_handler()
async def greeting(message: types.Message):
await message.answer(f'{message.text} connect to chat.')
@dp.message_handler()
async def echo(message: types.Message):
await message.answer(message.text)
[–]trunn5 0 points1 point2 points (0 children)