Answer the question
In order to leave comments, you need to log in
How to convert telebot script to aiogram?
Hello, please help me to convert this telebot script into aiogram
@bot.message_handler(content_types=["text"])
def skye(message):
if message.text.lower() in ('пока', 'гудбай'):
bot.send_message(message.chat.id, 'пока')
elif message.text.lower() in ('привет', 'хай'):
bot.send_message(message.chat.id, 'привет')
Answer the question
In order to leave comments, you need to log in
@dp.message_handler(content_types=types.ContentTypes.TEXT)
async def skye(message: types.Message):
if message.text.lower() in ('пока', 'гудбай'):
await message.answer('пока')
if message.text.lower() in ('привет', 'хай'):
await message.answer('привет')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question