Ejemplo n.º 1
0
def send_image():
    args = get_arguments()
    file_path = get_input(args)
    does_file_exist(file_path)
    telegram_bot = TelegramBot(auth_token=get_auth_token(args),
                               chat_id=get_chat_id(args))
    return telegram_bot.send_image(file_path)
Ejemplo n.º 2
0
def send_validated_video_preview():
    args = get_arguments()
    file_path = get_input(args)
    does_file_exist(file_path)
    if not is_file_valid(file_path, get_minimal_file_size(args)):
        return
    preview_path = get_video_preview_path(file_path)
    does_file_exist(preview_path)
    telegram_bot = TelegramBot(auth_token=get_auth_token(args),
                               chat_id=get_chat_id(args))
    return telegram_bot.send_image(preview_path)