def extra_help(self, bot, update):
"""
Show list of extra functions and their usage.
Triggered by `/extra`.
Args:
bot: Telegram Bot instance
update: Message update
"""
msg = "List of slave channel features:"
for n, i in enumerate(sorted(self.slaves)):
i = self.slaves[i]
msg += "\n\n<b>%s %s</b>" % (i.channel_emoji, i.channel_name)
xfns = i.get_extra_functions()
if xfns:
for j in xfns:
fn_name = "/%s_%s" % (n, j)
msg += "\n\n%s <b>(%s)</b>\n%s" % (
fn_name, xfns[j].name, xfns[j].desc.format(function_name=fn_name))
else:
msg += "No command found."
bot.send_message(update.message.chat.id, msg, parse_mode="HTML")
评论列表
文章目录