python_bot/handlers/start_help.py
Simple_Not ef4c806071
All checks were successful
continuous-integration/drone/push Build is passing
#8 надеюсь не сломается
2024-01-21 22:33:15 +10:00

28 lines
1.0 KiB
Python

from aiogram import types
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
from create_bot import dp, bot
@dp.message_handler(commands=['start'])
async def start_func(message: types.Message):
if message.chat.type == 'private':
lkb = InlineKeyboardMarkup(row_width=1).add(InlineKeyboardButton(text = 'Добавить в группу', callback_data='add_2_group'))
await message.answer(f'<b>Добро пожаловать, {message.from_user.full_name}!</b>\n'
'Это бот, который растит члены. Чтобы начать, добавь бота в чат'\
, reply_markup=lkb
)
# TODO добавить кнопку, по которой смогут добавлять юзера в чат
@dp.callback_query_handler(text = 'add_2_group')
async def addgroup(callback: types.CallbackQuery):
await callback.answer('жмав')