__init__.py 文件源码

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

项目:telegram-icecast2-bot 作者: hmsuorg 项目源码 文件源码
def start_tcb(self, bot, update, args):

        """
        start_tcb - callback triggered on /start command

        :param bot: bot object comes from telegram API
        :param update: update object comes from telegram API
        :param args: our custom args

        """

        user_data = bot.get_chat(update.message.chat_id)

        bot.sendMessage(
            chat_id=update.message.chat_id, text="Hello {}, I'm HMSU Radio Bot.".format(user_data.username)
        )

        # keyboard = [[InlineKeyboardButton("Get radiokey", callback_data='1'), InlineKeyboardButton("Help", callback_data='2')]]

        # reply_markup = InlineKeyboardMarkup(keyboard)

        # update.message.reply_text('Please choose:', reply_markup=reply_markup)


        bot.sendMessage(chat_id=update.message.chat_id, text="Type /help for full list of commands")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号