Bot.py 文件源码

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

项目:tinder-telegram-bot 作者: arthurdk 项目源码 文件源码
def set_auto(bot: Bot, update: Update):
    """
    Handles /auto command
    :param bot:
    :param update:
    :return:
    """
    global data
    chat_id = update.message.chat_id
    if chat_id in data.conversations:
        data.conversations[chat_id].auto = not data.conversations[chat_id].auto
        if data.conversations[chat_id].auto:
            message = "Automatic mode enabled."
        else:
            message = "Automatic mode disabled."
        send_custom_message(bot=bot, chat_id=chat_id, message=message)
    else:
        send_error(bot=bot, chat_id=chat_id, name="account_not_setup")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号