|
|
@ -312,7 +312,7 @@ module.exports = { |
|
|
|
if (!tempchar) {return;} |
|
|
|
if (!tempchar) {return;} |
|
|
|
args = tempchar.split(/\s+/g); |
|
|
|
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; |
|
|
|
let fn; |
|
|
|
if (asr === 0) { |
|
|
|
if (asr === 0) { |
|
|
|
return message.channel.send("That search returned no results! Try again?"); |
|
|
|
return message.channel.send("That search returned no results! Try again?"); |
|
|
@ -339,6 +339,7 @@ module.exports = { |
|
|
|
let ch = await Char.findOne({id: fn}); |
|
|
|
let ch = await Char.findOne({id: fn}); |
|
|
|
|
|
|
|
|
|
|
|
if (list) { |
|
|
|
if (list) { |
|
|
|
|
|
|
|
ch.images.push(ch.thumbnail); |
|
|
|
let pages = ch.images.map(im => new Discord.MessageEmbed() |
|
|
|
let pages = ch.images.map(im => new Discord.MessageEmbed() |
|
|
|
.setTitle(ch.name) |
|
|
|
.setTitle(ch.name) |
|
|
|
.setDescription(`**Name:** ${ch.name}`) |
|
|
|
.setDescription(`**Name:** ${ch.name}`) |
|
|
@ -359,7 +360,7 @@ module.exports = { |
|
|
|
if (!args[0]) { |
|
|
|
if (!args[0]) { |
|
|
|
let tempchar = message.attachments.size |
|
|
|
let tempchar = message.attachments.size |
|
|
|
? message.attachments.first().url |
|
|
|
? 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;} |
|
|
|
if (!tempchar) {return;} |
|
|
|
args = tempchar.split(/\s+/g); |
|
|
|
args = tempchar.split(/\s+/g); |
|
|
|
} |
|
|
|
} |
|
|
@ -388,7 +389,7 @@ module.exports = { |
|
|
|
.setFooter("Natsuki") |
|
|
|
.setFooter("Natsuki") |
|
|
|
], content: queue ? '<@330547934951112705>' : undefined |
|
|
|
], content: queue ? '<@330547934951112705>' : undefined |
|
|
|
}).catch(() => {})).catch(() => {}); |
|
|
|
}).catch(() => {})).catch(() => {}); |
|
|
|
return message.channel.send(`Character image ${queue ? "submitted" : "added"}.`); |
|
|
|
return message.channel.send(`Character image ${queue ? "submitted" : "added"} to **${ch.name}**.`); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (!queue) { |
|
|
|
if (!queue) { |
|
|
|
images.forEach(img => ch.images.push(img)); |
|
|
|
images.forEach(img => ch.images.push(img)); |
|
|
@ -408,7 +409,7 @@ module.exports = { |
|
|
|
.setFooter("Natsuki") |
|
|
|
.setFooter("Natsuki") |
|
|
|
], content: queue ? '<@330547934951112705>' : undefined |
|
|
|
], content: queue ? '<@330547934951112705>' : undefined |
|
|
|
}).catch(() => {})).catch(() => {}); |
|
|
|
}).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}**.`); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|