This commit is contained in:
Dragon Fire
2020-02-04 18:09:09 -05:00
parent 95f4630cd4
commit 56d16f8a28
+2 -1
View File
@@ -33,11 +33,12 @@ module.exports = class MadLibsCommand extends Command {
for (const word of lib.needed) { for (const word of lib.needed) {
await msg.reply(`Give me a **${word}**.`); await msg.reply(`Give me a **${word}**.`);
const filter = res => { const filter = res => {
if (res.author.id !== msg.author.id) return false;
if (!res.content || res.content.length > 12) { if (!res.content || res.content.length > 12) {
msg.reply('Please only use a maximum of 12 characters per word.').catch(() => null); msg.reply('Please only use a maximum of 12 characters per word.').catch(() => null);
return false; return false;
} }
return res.author.id === msg.author.id; return true;
} }
const choice = await msg.channel.awaitMessages(filter, { const choice = await msg.channel.awaitMessages(filter, {
max: 1, max: 1,