2020-08-06 05:52:13 +00:00
|
|
|
from tipbot import commands
|
2021-05-10 20:09:55 +00:00
|
|
|
from tipbot.helpers.utils import reply_user
|
2020-08-06 05:52:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
def help(update, context):
|
|
|
|
cmds = list()
|
|
|
|
for i in commands.all_commands:
|
|
|
|
pk = commands.all_commands[i]
|
|
|
|
if not pk.get('admin', False):
|
|
|
|
cmds.append('{example} - {help}'.format(
|
|
|
|
example=pk['example'],
|
|
|
|
help=pk['help']
|
|
|
|
))
|
2021-05-10 20:09:55 +00:00
|
|
|
msg = 'Here are the available commands for this bot:\n\n' + '\n\n'.join(cmds)
|
|
|
|
reply_user(update.message, context, msg)
|