|
|
@ -3,8 +3,8 @@ module.exports = async (message, toAsk, time, nofilter, timeoutResponse) => { |
|
|
|
let filter = nofilter ? () => true : m => m.author.id === message.author.id; |
|
|
|
let filter = nofilter ? () => true : m => m.author.id === message.author.id; |
|
|
|
try { |
|
|
|
try { |
|
|
|
let collected = await msg.channel.awaitMessages({filter: filter, max: 1, errors: ['time'], time: time}); |
|
|
|
let collected = await msg.channel.awaitMessages({filter: filter, max: 1, errors: ['time'], time: time}); |
|
|
|
collected = collected.first().content; |
|
|
|
if (collected.first().attachments.size > 0) {collected = collected.first().attachments.first().url;} |
|
|
|
//if (collected.first().attachments.size) {collected = collected.first().attachments.first().url;}
|
|
|
|
else {collected = collected.first().content;} |
|
|
|
return collected; |
|
|
|
return collected; |
|
|
|
} catch { |
|
|
|
} catch { |
|
|
|
if (timeoutResponse) {message.reply("This question has timed out! Please try again.");} |
|
|
|
if (timeoutResponse) {message.reply("This question has timed out! Please try again.");} |
|
|
|