diff --git a/commands/utility/screenshot.js b/commands/utility/screenshot.js index c1e016e9..f7125258 100644 --- a/commands/utility/screenshot.js +++ b/commands/utility/screenshot.js @@ -39,6 +39,8 @@ class screenshotCommand extends Command { // eslint-disable-next-line no-useless-escape let urlregex = new RegExp(/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/); + if (!args.url.includes('http')) args.url = 'http://' + args.url; + console.log(args.url); if (args.url.match(urlregex)) { // Only allow link with http/https await captureWebsite.file(args.url, `${os.tmpdir()}/${message.id}.jpg`, { type: 'jpeg',