From 5ef449a542c190fe0aeaa60cc74c3f3d4f788c16 Mon Sep 17 00:00:00 2001 From: Davte Date: Wed, 6 May 2020 00:44:21 +0200 Subject: [PATCH] Temp --- davtelepot/administration_tools.py | 16 ++++++++++++++++ davtelepot/messages.py | 10 ++++++++++ 2 files changed, 26 insertions(+) diff --git a/davtelepot/administration_tools.py b/davtelepot/administration_tools.py index 74dd6ac..bf0b90a 100644 --- a/davtelepot/administration_tools.py +++ b/davtelepot/administration_tools.py @@ -1024,6 +1024,10 @@ async def _load_talking_sessions(bot: Bot): ) +async def _father_command(bot, update): + return + + def init(telegram_bot: Bot, talk_messages: dict = None, admin_messages: dict = None, @@ -1097,6 +1101,18 @@ def init(telegram_bot: Bot, async def errors_command(bot, update, user_record): return await _errors_command(bot, update, user_record) + @telegram_bot.command(command='/father', + aliases=[], + show_in_keyboard=False, + **{ + key: value + for key, value in admin_messages['father_command'].items() + if key in ('description', ) + }, + authorization_level='admin') + async def father_command(bot, update): + return await _father_command(bot=bot, update=update) + @telegram_bot.command(command='/log', aliases=[], show_in_keyboard=False, diff --git a/davtelepot/messages.py b/davtelepot/messages.py index 3df1d7f..cddff97 100644 --- a/davtelepot/messages.py +++ b/davtelepot/messages.py @@ -66,6 +66,16 @@ default_admin_messages = { "L'ordine è cronologico, con i messaggi nuovi in alto." } }, + 'father_command': { + 'description': { + 'en': "Edit the @BotFather commands", + 'it': "Modifica i comandi con @BotFather", + }, + 'title': { + 'en': "🤖 BotFather commands\n\n", + 'it': "🤖 Comandi su BotFather\n\n", + } + }, 'log_command': { 'description': { 'en': "Receive bot log file, if set",