Queer European MD passionate about IT
Davte 5 年之前
父节点
当前提交
5ef449a542
共有 2 个文件被更改,包括 26 次插入0 次删除
  1. 16 0
      davtelepot/administration_tools.py
  2. 10 0
      davtelepot/messages.py

+ 16 - 0
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,

+ 10 - 0
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",