mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Fix
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user