handlers.py 文件源码

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

项目:recyclebot 作者: opendatahackathon 项目源码 文件源码
def where_cmd(bot, update, **args):
    msgText = 'where!! '
    query = update.callback_query
    where_args = args.get("args")
    buttonsListFlg = False
    address = ""
    if len(where_args) > 0:
        print(where_args[0])
        address = find_address(where_args[0])
        if address != "":
            msgText = msgText + ' ' + address;
        else:
            buttonsListFlg = True
    else:
        buttonsListFlg = True
    if buttonsListFlg:
        reply_markup = InlineKeyboardMarkup(districts_button_list)
        bot.sendMessage(chat_id=update.message.chat_id, reply_markup=reply_markup,
                        text='???????? ?????????? ????? ??????:')
    else:
        bot.sendMessage(chat_id=update.message.chat.id, text=msgText)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号