python_bot_v2/handlers/start_help.py

25 lines
1.0 KiB
Python

from aiogram import types, Dispatcher
from create_bot import dp, bot
@dp.message_handler(commands=['start'])
async def start_func(message: types.Message):
# user_id = message.from_user.id
# user_full_name = message.from_user.full_name
# logging.INFO(f'{user_id=} {user_full_name=}', {time.asctime()})
await message.reply('похуй')
@dp.message_handler(commands=['photo'])
async def send_image(message: types.Message):
await bot.send_photo(message.chat.id, photo='https://memepedia.ru/wp-content/uploads/2018/08/ya-pidoras.jpg', reply_to_message_id=message.message_id)
@dp.message_handler(content_types=types.ContentTypes.TEXT)
async def send_faggot(message: types.Message):
print(message.text)
if message.text == 'хто я':
await bot.send_photo(message.chat.id, photo='https://www.meme-arsenal.com/memes/ecebd2339c7eab40e09874bd86a38a09.jpg')
def register_handlers_StartHelp(dp: Dispatcher):
dp.register_message_handler(start_func)
dp.register_message_handler(send_faggot)
dp.register_message_handler(send_image)