initial commit

This commit is contained in:
2024-04-27 21:42:08 +04:00
commit ecfd86bead
19 changed files with 294 additions and 0 deletions

0
app/handlers/__init__.py Normal file
View File

10
app/handlers/events.py Normal file
View File

@ -0,0 +1,10 @@
from app.settings import bot, secrets
from app import views
async def start_bot():
await bot.send_message(secrets.admin_id, views.start_bot_message())
async def stop_bot():
await bot.send_message(secrets.admin_id, views.stop_bot_message())

9
app/handlers/message.py Normal file
View File

@ -0,0 +1,9 @@
from aiogram.types import Message, MessageEntity, PhotoSize, ReactionTypeEmoji
from app.utils.send_to_notion import send_to_notion
async def parse_message(message: Message):
await send_to_notion(message)
await message.react([ReactionTypeEmoji(emoji="👌")])

6
app/handlers/simple.py Normal file
View File

@ -0,0 +1,6 @@
from aiogram.types import Message
from app import views
async def start_command(message: Message):
await message.answer(views.start_text())