better img output

master
Kit Kasune 3 years ago
parent 6814d38a33
commit a2528914ac
  1. 9
      commands/anime/char.js
  2. 6
      commands/anime/charimage.js

@ -312,7 +312,7 @@ module.exports = {
if (!tempchar) {return;}
args = tempchar.split(/\s+/g);
}
let asr = await chs(message, client, args.join(" ").trim().toLowerCase(), -700, 0);
let asr = await chs(message, client, args.join(" ").trim().toLowerCase(), -700);
let fn;
if (asr === 0) {
return message.channel.send("That search returned no results! Try again?");
@ -339,6 +339,7 @@ module.exports = {
let ch = await Char.findOne({id: fn});
if (list) {
ch.images.push(ch.thumbnail);
let pages = ch.images.map(im => new Discord.MessageEmbed()
.setTitle(ch.name)
.setDescription(`**Name:** ${ch.name}`)
@ -359,7 +360,7 @@ module.exports = {
if (!args[0]) {
let tempchar = message.attachments.size
? message.attachments.first().url
: await ask(message, "Please paste the image or a link to the image you'd like to add.", 60000, false, true);
: await ask(message, `Please paste the image or a link to the image you'd like to add to **${ch.name}**.`, 60000, false, true);
if (!tempchar) {return;}
args = tempchar.split(/\s+/g);
}
@ -388,7 +389,7 @@ module.exports = {
.setFooter("Natsuki")
], content: queue ? '<@330547934951112705>' : undefined
}).catch(() => {})).catch(() => {});
return message.channel.send(`Character image ${queue ? "submitted" : "added"}.`);
return message.channel.send(`Character image ${queue ? "submitted" : "added"} to **${ch.name}**.`);
} else {
if (!queue) {
images.forEach(img => ch.images.push(img));
@ -408,7 +409,7 @@ module.exports = {
.setFooter("Natsuki")
], content: queue ? '<@330547934951112705>' : undefined
}).catch(() => {})).catch(() => {});
return message.channel.send(`Character images ${queue ? "submitted" : "added"}.`);
return message.channel.send(`Character images (${images.length}) ${queue ? "submitted" : "added"} to **${ch.name}**.`);
}
}
}

@ -80,7 +80,7 @@ module.exports = {
if (!args[0]) {
let tempchar = message.attachments.size
? message.attachments.first().url
: await ask(message, "Please paste the image or a link to the image you'd like to add.", 60000, false, true);
: await ask(message, `Please paste the image or a link to the image you'd like to add to **${ch.name}**.`, 60000, false, true);
if (!tempchar) {return;}
args = tempchar.split(/\s+/g);
}
@ -109,7 +109,7 @@ module.exports = {
.setFooter("Natsuki")
], content: queue ? '<@330547934951112705>' : undefined
}).catch(() => {})).catch(() => {});
return message.channel.send(`Character image ${queue ? "submitted" : "added"}.`);
return message.channel.send(`Character image ${queue ? "submitted" : "added"} to **${ch.name}**.`);
} else {
if (!queue) {
images.forEach(img => ch.images.push(img));
@ -129,7 +129,7 @@ module.exports = {
.setFooter("Natsuki")
], content: queue ? '<@330547934951112705>' : undefined
}).catch(() => {})).catch(() => {});
return message.channel.send(`Character images ${queue ? "submitted" : "added"}.`);
return message.channel.send(`Character images (${images.length}) ${queue ? "submitted" : "added"} to **${ch.name}**.`);
}
}
}

Loading…
Cancel
Save