Skeleton of project - database loading

This commit is contained in:
BarsTiger
2023-02-13 19:51:25 +02:00
commit f778d3f71c
23 changed files with 348 additions and 0 deletions

23
bot/handlers/help/help.py Normal file
View File

@@ -0,0 +1,23 @@
from aiogram import types
from bot.common import dp
from .help_strings import help_data
@dp.message_handler(commands='help')
async def help_command(message: types.Message):
if message.get_args() == "":
await message.reply(
"\n".join(
list(
map(
(lambda x: f"/{x} - {help_data.get(x) if help_data.get(x) else f'No info for {x}'}"),
help_data.keys()
)
)
)
)
else:
if help_data.get(message.get_args()):
await message.reply(help_data.get(message.get_args()))
else:
await message.reply(f"No info for {message.get_args()}")