/init -> /reset
This commit is contained in:
parent
b3f4e24743
commit
26e76cde2f
|
@ -151,7 +151,7 @@ async def help(update, context):
|
|||
# Admin commands
|
||||
adm_header = _('*Additional commands for bot admins*')
|
||||
adm_help = {
|
||||
_('init'):_('reinitialize the bot\. This updates inline suggestions'
|
||||
_('reset'):_('reset the bot\. This updates inline suggestions'
|
||||
' and purges /epiphony cached files\.'),
|
||||
_('stop'):_('stop Albatrobot\. To be used _only_ in case of emergency:'
|
||||
' restarting the bot after this command is used requires direct'
|
||||
|
@ -182,8 +182,8 @@ async def help(update, context):
|
|||
)
|
||||
|
||||
|
||||
async def init(update, context):
|
||||
"""Initialize the bot."""
|
||||
async def reset(update, context):
|
||||
"""Reset the bot."""
|
||||
# Set commands suggestions
|
||||
commands=[BotCommand(_('christmas'),_('Get an image')),
|
||||
BotCommand(_('easter'),_('Get a citation')),
|
||||
|
|
6
main.py
6
main.py
|
@ -43,7 +43,7 @@ application.add_handler(
|
|||
albatrobot.unauthorized_user)
|
||||
)
|
||||
application.add_handler(
|
||||
CommandHandler(['stop',_('stop'),'init',_('init')],
|
||||
CommandHandler(['stop',_('stop'),'reset',_('reset')],
|
||||
albatrobot.unauthorized_user,
|
||||
(~filters.User(ADMINS)))
|
||||
)
|
||||
|
@ -64,8 +64,8 @@ application.add_handler(
|
|||
albatrobot.help)
|
||||
)
|
||||
application.add_handler(
|
||||
CommandHandler(['init',_('init')],
|
||||
albatrobot.init)
|
||||
CommandHandler(['reset',_('reset')],
|
||||
albatrobot.reset)
|
||||
)
|
||||
application.add_handler(
|
||||
CommandHandler(['legal',_('legal')],
|
||||
|
|
Loading…
Reference in New Issue