From 7ed7b6c338347c9981a2b8ac4e0efd1970b413d2 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 16 Jul 2020 09:24:44 +0200 Subject: [PATCH] Use url type --- commands/fun/spb.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/fun/spb.js b/commands/fun/spb.js index fe9456f..8669f65 100644 --- a/commands/fun/spb.js +++ b/commands/fun/spb.js @@ -12,7 +12,7 @@ class spbCommand extends Command { args: [ { id: 'link', - type: 'string', + type: 'url', prompt: { start: 'Need a shitpostbot5000 template link!', } @@ -27,11 +27,11 @@ class spbCommand extends Command { } async exec(message, args) { - if (!args.link || !args.link.includes('shitpostbot.com/template/')) { + if (!args.link || !args.link.href.includes('shitpostbot.com/template/')) { return message.channel.send('Need a Shitpostbot 5000 template link!\nYou can find them here! '); } - let link = args.link.replace('template', 'preview'); + let link = args.link.href.replace('template', 'preview'); fetch(link) .then(res => {