コード例 #1
0
ファイル: views.py プロジェクト: Cryolitech/Miass
def disactivate_notice_all(message):
    update_hash_notice(message.chat.id, 'time_notice_status','0')
    update_hash_notice(message.chat.id, 'currency_notice_status', '0')
    update_hash_notice(message.chat.id, 'weather_notice_status', '0')
    bot.send_message(message.chat.id, 'Отписка от всех уведомлений. Почему? Надеюсь, это в последний раз :(')
    db = SQL_Postgre()
    db.update_user_notice(message.chat.id, False,False,False)
    db.close()
コード例 #2
0
ファイル: views.py プロジェクト: Cryolitech/Miass
def disactivate_weather_notice(message):
    update_hash_notice(message.chat.id, 'weather_notice_status', '0')
    bot.send_message(message.chat.id, 'Отписка от уведомления')
    db = SQL_Postgre()
    db.update_weather_notice_status(message.chat.id, False)
    db.close()
コード例 #3
0
ファイル: views.py プロジェクト: Cryolitech/Miass
def activate_weather_notice(message):
    update_hash_notice(message.chat.id, 'weather_notice_status', '1')
    bot.send_message(message.chat.id, 'Подписка оформлена')
    db = SQL_Postgre()
    db.update_weather_notice_status(message.chat.id, True)
    db.close()