示例#1
0
def main():
    args = parse_args()
    with open(args.token_path, "r") as token_file:
        token = token_file.read()
    with open(args.flickr_api_path, "r") as flickr_api_file:
        flickr_keys = flickr_api_file.read().split('\n')
    app.init_bot(token, flickr_keys)
    app.BOT.polling(none_stop=True, interval=1)
示例#2
0
def main():
    args = parse_args()
    with open(args.token_path, "r") as token_file:
        token = token_file.read()
    #???
    app.init_bot(token)
    app.bot.send_message(chat_id=665328452, text="YES")
    # Constantly checking for updates on the server.
    app.bot.polling(none_stop=True, interval=1)
示例#3
0
def main():
    args = parse_args()
    with open(args.bot_token_path, "r") as token_file:
        bot_token = token_file.read()
    with open(args.food_token_path, "r") as token_file:
        food_token = token_file.read()
    app.get_food_token(food_token)
    app.init_bot(bot_token)
    while True:
        try:
            app.BOT.polling(none_stop=True)
        except Exception:
            time.sleep(1)
示例#4
0
def main():
    args = parse_args()
    app.init_bot('823664291:AAEfuC8rMJ4eRke2vSrdUsHy7h67RkPO3cE')
    app.bot.polling(none_stop=True, interval=1)
示例#5
0
def main():
    args = parse_args()
    with open(args.token_path, "r") as token_file:
        token = token_file.read().rstrip()
    app.init_bot(token)
    app.bot.polling()
示例#6
0
def main():
    args = parse_args()
    with open(args.token_path, "r") as token_file:
        token = token_file.read()
    app.init_bot(token)
    app.bot.polling(none_stop=True, interval=1)
示例#7
0
def main():
    app.init_bot()
    app.bot.polling(none_stop=True, interval=1)