From df4efd0f08b69c3ef52d04fae7cd2e2454899af3 Mon Sep 17 00:00:00 2001 From: Akash Kava <39438041+ackava@users.noreply.github.com> Date: Thu, 16 Mar 2023 17:48:11 +0530 Subject: [PATCH] wip --- src/BaseCommand.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/BaseCommand.ts b/src/BaseCommand.ts index 7346a89..1718a2f 100644 --- a/src/BaseCommand.ts +++ b/src/BaseCommand.ts @@ -104,13 +104,14 @@ export default class BaseCommand { video, } = event; - if(!url) { - throw new Error("No url specified"); + if (url) { + console.log(`Received URL: ${url}`); + } else if (content) { + console.log(`Setting content ${content.split("\n")[0]} ... `); + } else { + throw new Error("No url or content specified"); } - - console.log(`Received URL: ${url}`); - const { page } = await this.createPage({ mobile, width,