This commit is contained in:
Davte
2020-05-06 00:44:21 +02:00
parent a2c83f8d9c
commit 5ef449a542
2 changed files with 26 additions and 0 deletions

View File

@@ -1024,6 +1024,10 @@ async def _load_talking_sessions(bot: Bot):
) )
async def _father_command(bot, update):
return
def init(telegram_bot: Bot, def init(telegram_bot: Bot,
talk_messages: dict = None, talk_messages: dict = None,
admin_messages: dict = None, admin_messages: dict = None,
@@ -1097,6 +1101,18 @@ def init(telegram_bot: Bot,
async def errors_command(bot, update, user_record): async def errors_command(bot, update, user_record):
return await _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', @telegram_bot.command(command='/log',
aliases=[], aliases=[],
show_in_keyboard=False, show_in_keyboard=False,

View File

@@ -66,6 +66,16 @@ default_admin_messages = {
"L'ordine è cronologico, con i messaggi nuovi in alto." "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': { 'log_command': {
'description': { 'description': {
'en': "Receive bot log file, if set", 'en': "Receive bot log file, if set",