tg-bot/tipbot/commands/help.py

15 lines
470 B
Python
Raw Normal View History

2020-08-06 05:52:13 +00:00
from tipbot import commands
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 04:40:42 +00:00
update.message.from_user.send_message('Here are the available commands for this bot:\n\n' + '\n\n'.join(cmds))
update.message.delete()