예제 #1
0
def notifUpdate():
    parser.read("config/message.ini")
    msg = parser.get("bot", "notifUpdate")
    sticker = parser.get("bot", "notifUpdateSticker")
    parser.clear()
    db = Database()
    db.connection()

    listchat_id = db.getAllUserOwner()

    #send message
    #send message
    for i in listchat_id:
        dispatcher.bot.send_message(chat_id=i, text=msg)
        dispatcher.bot.send_sticker(chat_id=i, sticker=sticker)
예제 #2
0
def notifMaintenance():
    parser.read("config/message.ini")

    msg = parser.get("bot", "notifMaintenance")
    #msg.replace('\\n','\n')
    sticker = parser.get("bot", "notifMaintenanceSticker")
    parser.clear()
    db = Database()
    db.connection()
    print(msg)
    listchat_id = db.getAllUserOwner()
    print(listchat_id)
    #send message

    for i in listchat_id:
        dispatcher.bot.send_message(chat_id=i,
                                    text=msg,
                                    parse_mode=ParseMode.HTML)
        dispatcher.bot.send_sticker(chat_id=i, sticker=sticker)