olgram/olgram/commands/start.py

44 lines
1.2 KiB
Python
Raw Normal View History

2021-07-11 12:53:33 +03:00
"""
Здесь простые команды на первом уровне вложенности: /start /help
"""
from aiogram import types
2021-06-11 21:56:03 +03:00
from aiogram.dispatcher import FSMContext
2021-06-11 23:46:37 +03:00
from textwrap import dedent
2021-09-09 19:16:28 +03:00
from olgram.settings import OlgramSettings
2021-06-11 21:56:03 +03:00
2021-09-06 00:36:03 +03:00
from olgram.router import dp
2021-06-11 21:56:03 +03:00
2021-09-06 00:36:03 +03:00
@dp.message_handler(commands=["start"], state="*")
2021-06-11 21:56:03 +03:00
async def start(message: types.Message, state: FSMContext):
"""
Команда /start
2021-06-11 21:56:03 +03:00
"""
2021-06-11 23:46:37 +03:00
await state.reset_state()
# TODO: locale
await message.answer(dedent("""
Olgram Bot это конструктор ботов обратной связи в Telegram.
Используйте эти команды, чтобы управлять этим ботом:
/addbot - добавить бот
/mybots - управление ботами
2021-06-11 21:56:03 +03:00
2021-06-11 23:46:37 +03:00
/help - помощь
"""))
2021-09-06 00:36:03 +03:00
@dp.message_handler(commands=["help"], state="*")
2021-06-11 23:46:37 +03:00
async def help(message: types.Message, state: FSMContext):
"""
Команда /help
2021-06-11 23:46:37 +03:00
"""
2021-09-09 19:16:28 +03:00
await message.answer(dedent(f"""
2021-09-22 21:38:22 +03:00
Читайте инструкции на нашем сайте https://olgram.readthedocs.io
Техническая поддержка: @civsocit_feedback_bot
2021-09-16 20:52:45 +03:00
Версия {OlgramSettings.version()}
2021-06-11 23:46:37 +03:00
"""))