alarm_bot.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:AlarmBot 作者: guysoft 项目源码 文件源码
def help(self, bot, update):
        icon = emojize(":information_source: ", use_aliases=True)
        text = icon + " The following commands are available:\n"

        commands = [["/new", "Create new alarm"],
                    ["/list", "List alarms, enable/disable and remove alarms"],
                    ["/stop", "Stop all alarms"],
                    ["/timezone", "Set the timezone (only works if sudo requires no password)"],
                    ["/test", "Play an alarm to test"],
                    ["/time", "Print time and timezone on device"],
                    ["/help", "Get this message"]
                    ]

        for command in commands:
            text += command[0] + " " + command[1] + "\n"

        bot.send_message(chat_id=update.message.chat_id, text=text)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号