forked from Supositware/Haha-Yes
Use url type
This commit is contained in:
parent
8d53b90b4d
commit
7ed7b6c338
1 changed files with 3 additions and 3 deletions
|
@ -12,7 +12,7 @@ class spbCommand extends Command {
|
||||||
args: [
|
args: [
|
||||||
{
|
{
|
||||||
id: 'link',
|
id: 'link',
|
||||||
type: 'string',
|
type: 'url',
|
||||||
prompt: {
|
prompt: {
|
||||||
start: 'Need a shitpostbot5000 template link!',
|
start: 'Need a shitpostbot5000 template link!',
|
||||||
}
|
}
|
||||||
|
@ -27,11 +27,11 @@ class spbCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
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! <https://www.shitpostbot.com/gallery/templates>');
|
return message.channel.send('Need a Shitpostbot 5000 template link!\nYou can find them here! <https://www.shitpostbot.com/gallery/templates>');
|
||||||
}
|
}
|
||||||
|
|
||||||
let link = args.link.replace('template', 'preview');
|
let link = args.link.href.replace('template', 'preview');
|
||||||
|
|
||||||
fetch(link)
|
fetch(link)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
|
Loading…
Reference in a new issue