Bot.py 文件源码

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

项目:tinder-telegram-bot 作者: arthurdk 项目源码 文件源码
def unlink(bot: Bot, update: Update):
    """
    Handles /unlink command
    :param bot:
    :param update:
    :return:
    """
    global data
    sender = update.message.from_user.id
    chat_id = update.message.chat_id
    if chat_id in data.conversations:
        if sender == data.conversations[chat_id].owner:
            del data.conversations[chat_id]
            send_message(bot, chat_id, name="account_unlinked")
        else:
            send_error(bot, chat_id=chat_id, name="command_not_allowed")
    else:
        send_error(bot, chat_id=chat_id, name="account_not_setup")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号