1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-05-24 19:53:25 +00:00
olgram/olgram/commands/start.py
2021-09-16 20:52:56 +03:00

48 lines
1.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
Здесь простые команды на первом уровне вложенности: /start /help
"""
from aiogram import types
from aiogram.dispatcher import FSMContext
from textwrap import dedent
from olgram.settings import OlgramSettings
from olgram.router import dp
@dp.message_handler(commands=["start"], state="*")
async def start(message: types.Message, state: FSMContext):
"""
Команда /start
"""
await state.reset_state()
# TODO: locale
await message.answer(dedent("""
Olgram Bot — это конструктор ботов обратной связи в Telegram.
Используйте эти команды, чтобы управлять этим ботом:
/addbot - добавить бот
/mybots - управление ботами
/help - помощь
Ссылка на репозиторий https://github.com/civsocit/olgram
"""))
@dp.message_handler(commands=["help"], state="*")
async def help(message: types.Message, state: FSMContext):
"""
Команда /help
"""
await message.answer(dedent(f"""
О проекте https://telegra.ph/Olgram-09-15
Поддержка: @civsocit_feedback_bot
Версия {OlgramSettings.version()}
"""))