Added start command

This commit is contained in:
2024-01-23 13:27:17 +03:00
parent 3d65fa554f
commit 2cb26ee186

View File

@@ -1,6 +1,7 @@
from typing import List from typing import List
from aiogram import Bot, F, types from aiogram import Bot, F, types
from aiogram.filters import CommandStart
from handlers.handler import Handler from handlers.handler import Handler
from neuroapi import neuroapi from neuroapi import neuroapi
@@ -12,6 +13,10 @@ class UserCommands(Handler):
def __init__(self, bot: Bot) -> None: def __init__(self, bot: Bot) -> None:
super().__init__(bot) super().__init__(bot)
@self.router.message(CommandStart())
async def start_command(message: types.Message):
await message.answer("Добро пожаловать! Данный бот - предложка для канала @neur0w0men. Отправляйте свои пожелания насчет нейрокартинок, а также свои картинки, а админы постараются заняться этим!\nДанный бот принимает текст, картинки, документы и стикеры.")
@self.router.message(F.chat.type == 'private') @self.router.message(F.chat.type == 'private')
async def forward_post(message: types.Message): async def forward_post(message: types.Message):
admins: List[AdminType] = await neuroapi.admin.get() admins: List[AdminType] = await neuroapi.admin.get()