You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
483 B
12 lines
483 B
4 years ago
|
module.exports = async (message, toAsk, time, nf) => {
|
||
|
let msg = await message.channel.send(toAsk);
|
||
|
let filter = nf ? () => true : m => m.author.id === message.author.id;
|
||
|
try {
|
||
|
let collected = await msg.channel.awaitMessages(filter, {max: 1, errors: ['time'], time: time});
|
||
|
collected = collected.first().content;
|
||
|
return collected;
|
||
|
} catch {
|
||
|
message.reply("This question has timed out! Please try again.");
|
||
|
return null;
|
||
|
}
|
||
|
};
|