From 5f6dff1d7edce6d3478195dc81d25f606ab859dc Mon Sep 17 00:00:00 2001 From: Aryn <63111101+arynyklas@users.noreply.github.com> Date: Sun, 5 Dec 2021 16:43:47 +0600 Subject: [PATCH] Update echo_bot.py --- examples/echo_bot.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/examples/echo_bot.py b/examples/echo_bot.py index 0055d155..fdde038d 100644 --- a/examples/echo_bot.py +++ b/examples/echo_bot.py @@ -17,30 +17,6 @@ bot = Bot(token=API_TOKEN) dp = Dispatcher(bot) -@dp.message_handler(commands=['start', 'help']) -async def send_welcome(message: types.Message): - """ - This handler will be called when user sends `/start` or `/help` command - """ - await message.reply("Hi!\nI'm EchoBot!\nPowered by aiogram.") - - -@dp.message_handler(regexp='(^cat[s]?$|puss)') -async def cats(message: types.Message): - with open('data/cats.jpg', 'rb') as photo: - ''' - # Old fashioned way: - await bot.send_photo( - message.chat.id, - photo, - caption='Cats are here 😺', - reply_to_message_id=message.message_id, - ) - ''' - - await message.reply_photo(photo, caption='Cats are here 😺') - - @dp.message_handler() async def echo(message: types.Message): # old style: