|
|
@ -48,14 +48,16 @@ module.exports = { |
|
|
|
} else if (asr instanceof Pagination) { |
|
|
|
} else if (asr instanceof Pagination) { |
|
|
|
await asr.start({user: message.author.id, startPage: 1, endTime: 60000}); |
|
|
|
await asr.start({user: message.author.id, startPage: 1, endTime: 60000}); |
|
|
|
await asr.message.react('✅'); |
|
|
|
await asr.message.react('✅'); |
|
|
|
await message.channel.send("React with :white_check_mark: when you've found the character you want!"); |
|
|
|
let noticeDel = await message.channel.send("React with :white_check_mark: when you've found the character you want!"); |
|
|
|
let arc; |
|
|
|
let arc; |
|
|
|
try {arc = await asr.message.awaitReactions({filter: (r, u) => ['✅', '⏹'].includes(r.emoji.name), max: 1, errors: ['time']});} |
|
|
|
try {arc = await asr.message.awaitReactions({filter: (r, u) => ['✅', '⏹'].includes(r.emoji.name), max: 1, errors: ['time']});} |
|
|
|
catch {return message.reply("Looks like you didn't find the character you were looking for.");} |
|
|
|
catch {return message.reply("Looks like you didn't find the character you were looking for.");} |
|
|
|
collected = arc.first().emoji.name; |
|
|
|
collected = arc.first().emoji.name; |
|
|
|
if (collected === '✅') { |
|
|
|
if (collected === '✅') { |
|
|
|
fn = client.misc.cache.chars.get(asr.getCurrentPage().title.trim()); |
|
|
|
fn = client.misc.cache.chars.get(asr.getCurrentPage().title.trim()); |
|
|
|
asr.stop(); |
|
|
|
await asr.stop(); |
|
|
|
|
|
|
|
await asr.message.delete().catch(() => {}); |
|
|
|
|
|
|
|
await noticeDel.delete().catch(() => {}); |
|
|
|
} |
|
|
|
} |
|
|
|
else {return message.reply("Looks like you didn't find the character you were looking for.");} |
|
|
|
else {return message.reply("Looks like you didn't find the character you were looking for.");} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|