Fix all awaitMessages

This commit is contained in:
Dragon Fire
2024-03-20 00:04:07 -04:00
parent 02500a4336
commit 47f6333c60
49 changed files with 130 additions and 66 deletions
+16 -8
View File
@@ -171,7 +171,8 @@ module.exports = class YuGiOhGenCommand extends Command {
if (res.author.id !== msg.author.id) return false;
return res.content.toLowerCase() === 'cancel' || monsterTypes.includes(res.content.toLowerCase());
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 60000
});
@@ -187,7 +188,8 @@ module.exports = class YuGiOhGenCommand extends Command {
What name should your card have?
Respond with \`cancel\` to cancel the command. The command will automatically be cancelled in 60 seconds.
`);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 60000
});
@@ -207,7 +209,8 @@ module.exports = class YuGiOhGenCommand extends Command {
if (res.author.id !== msg.author.id) return false;
return res.content.toLowerCase() === 'cancel' || atrs.includes(res.content.toLowerCase());
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 60000
});
@@ -223,7 +226,8 @@ module.exports = class YuGiOhGenCommand extends Command {
What type should your monster be? For example, "Dragon".
Respond with \`cancel\` to cancel the command. The command will automatically be cancelled in 60 seconds.
`);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 60000
});
@@ -239,7 +243,8 @@ module.exports = class YuGiOhGenCommand extends Command {
What effect should your card have?
Respond with \`cancel\` to cancel the command. The command will automatically be cancelled in 60 seconds.
`);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 60000
});
@@ -261,7 +266,8 @@ module.exports = class YuGiOhGenCommand extends Command {
const int = Number.parseInt(res.content, 10);
return int >= 0 && int <= 12;
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 60000
});
@@ -283,7 +289,8 @@ module.exports = class YuGiOhGenCommand extends Command {
const int = Number.parseInt(res.content, 10);
return int >= 0 && int <= 9999;
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 60000
});
@@ -312,7 +319,8 @@ module.exports = class YuGiOhGenCommand extends Command {
const int = Number.parseInt(res.content, 10);
return int >= 0 && int <= (monsterType === 'link' ? 8 : 9999);
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 60000
});
+2 -1
View File
@@ -96,7 +96,8 @@ module.exports = class ApplesToApplesCommand extends Command {
if (!cards[Number.parseInt(res.content, 10) - 1]) return false;
return true;
};
const chosen = await msg.channel.awaitMessages(filter, {
const chosen = await msg.channel.awaitMessages({
filter,
max: 1,
time: 120000
});
+1 -1
View File
@@ -84,7 +84,7 @@ module.exports = class BingoCommand extends Command {
}
return true;
};
const bingo = await msg.channel.awaitMessages(filter, { max: 1, time: 20000 });
const bingo = await msg.channel.awaitMessages({ filter, max: 1, time: 20000 });
if (!players.size) {
winner = 0;
break;
+8 -4
View File
@@ -380,7 +380,8 @@ module.exports = class CarRaceCommand extends Command {
if (res.author.id !== msg.author.id) return false;
return Object.keys(difficulties).includes(res.content.toLowerCase());
};
const difficultyPick = await msg.channel.awaitMessages(difficultyFilter, {
const difficultyPick = await msg.channel.awaitMessages({
filter: difficultyFilter,
max: 1,
time: 30000
});
@@ -405,7 +406,8 @@ module.exports = class CarRaceCommand extends Command {
if (res.author.id !== opponent.id) return false;
return available.includes(res.content.toLowerCase());
};
const p2Car = await msg.channel.awaitMessages(filter, {
const p2Car = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
@@ -448,7 +450,8 @@ module.exports = class CarRaceCommand extends Command {
if (![opponent.id, msg.author.id].includes(res.author.id)) return false;
return res.content.toLowerCase() === 'end';
};
const earlyEnd = await msg.channel.awaitMessages(earlyFilter, {
const earlyEnd = await msg.channel.awaitMessages({
filter: earlyFilter,
max: 1,
time: randomRange(1000, 30000)
});
@@ -464,7 +467,8 @@ module.exports = class CarRaceCommand extends Command {
if (res.content.toLowerCase() === 'end') return true;
return res.content.toLowerCase() === word;
};
const winner = await msg.channel.awaitMessages(turnFilter, {
const winner = await msg.channel.awaitMessages({
filter: turnFilter,
max: 1,
time: opponent.bot ? difficulties[difficulty] : 30000
});
+2 -1
View File
@@ -96,7 +96,8 @@ module.exports = class CardsAgainstHumanityCommand extends Command {
if (!cards[Number.parseInt(res.content, 10) - 1]) return false;
return true;
};
const chosen = await msg.channel.awaitMessages(filter, {
const chosen = await msg.channel.awaitMessages({
filter,
max: 1,
time: 120000
});
+4 -2
View File
@@ -88,7 +88,8 @@ module.exports = class ConnectFourCommand extends Command {
if (hasCustom && msg.guild && !msg.guild.emojis.cache.has(hasCustom[2])) return false;
return (hasCustom && msg.guild) || hasEmoji || available.includes(res.content.toLowerCase());
};
const p2Color = await msg.channel.awaitMessages(filter, {
const p2Color = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
@@ -133,7 +134,8 @@ module.exports = class ConnectFourCommand extends Command {
const j = Number.parseInt(choice, 10) - 1;
return board[colLevels[j]] && board[colLevels[j]][j] !== undefined;
};
const turn = await msg.channel.awaitMessages(pickFilter, {
const turn = await msg.channel.awaitMessages({
filter: pickFilter,
max: 1,
time: 60000
});
+4 -2
View File
@@ -62,7 +62,8 @@ module.exports = class CramCommand extends Command {
if (res.author.id !== opponent.id) return false;
return available.includes(res.content.toLowerCase());
};
const p2Color = await msg.channel.awaitMessages(filter, {
const p2Color = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
@@ -93,7 +94,8 @@ module.exports = class CramCommand extends Command {
if (!possibleMoves.includes(`${direction}${x - 1},${y - 1}`)) return false;
return true;
};
const turn = await msg.channel.awaitMessages(colorFilter, {
const turn = await msg.channel.awaitMessages({
filter: colorFilter,
max: 1,
time: 60000
});
+4 -2
View File
@@ -62,7 +62,8 @@ module.exports = class DomineeringCommand extends Command {
if (res.author.id !== opponent.id) return false;
return available.includes(res.content.toLowerCase());
};
const p2Color = await msg.channel.awaitMessages(filter, {
const p2Color = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
@@ -92,7 +93,8 @@ module.exports = class DomineeringCommand extends Command {
if (!possibleMoves.includes(`${x - 1},${y - 1}`)) return false;
return true;
};
const turn = await msg.channel.awaitMessages(colorFilter, {
const turn = await msg.channel.awaitMessages({
filter: colorFilter,
max: 1,
time: 60000
});
+2 -1
View File
@@ -79,7 +79,8 @@ module.exports = class DotsAndBoxesCommand extends Command {
}
return !taken.includes(`${first}-${second}`);
};
const turn = await msg.channel.awaitMessages(filter, {
const turn = await msg.channel.awaitMessages({
filter,
max: 1,
time: 60000
});
+2 -1
View File
@@ -54,7 +54,8 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command {
const emoji = [emojis[num], emojisNew[num]];
await msg.say(emojisNew[num]);
const filter = res => [msg.author.id, opponent.id].includes(res.author.id) && emoji.includes(res.content);
const win = await msg.channel.awaitMessages(filter, {
const win = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+4 -2
View File
@@ -90,7 +90,8 @@ module.exports = class GuesspionageCommand extends Command {
const int = Number.parseInt(res.content, 10);
return int >= 0 && int <= 100;
};
const initialGuess = await msg.channel.awaitMessages(initialGuessFilter, {
const initialGuess = await msg.channel.awaitMessages({
filter: initialGuessFilter,
max: 1,
time: 30000
});
@@ -115,7 +116,8 @@ module.exports = class GuesspionageCommand extends Command {
reactIfAble(res, res.author, SUCCESS_EMOJI_ID, '✅');
return true;
};
const everyoneElse = await msg.channel.awaitMessages(everyoneElseFilter, {
const everyoneElse = await msg.channel.awaitMessages({
filter: everyoneElseFilter,
max: awaitedPlayers.length - 1,
time: 30000
});
+2 -1
View File
@@ -42,7 +42,8 @@ module.exports = class GunfightCommand extends Command {
await msg.say(`TYPE \`${word.toUpperCase()}\` NOW!`);
const filter = res => [opponent.id, msg.author.id].includes(res.author.id) && res.content.toLowerCase() === word;
const now = Date.now();
const winner = await msg.channel.awaitMessages(filter, {
const winner = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+4 -2
View File
@@ -71,7 +71,8 @@ module.exports = class ImposterCommand extends Command {
if (res.content && wordRegex.test(res.content)) return true;
return false;
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 600000
});
@@ -119,7 +120,8 @@ module.exports = class ImposterCommand extends Command {
}
return false;
};
const vote = await msg.channel.awaitMessages(voteFilter, {
const vote = await msg.channel.awaitMessages({
filter: voteFilter,
max: players.filter(player => !player.killed).size,
time: 60000
});
+2 -1
View File
@@ -82,7 +82,8 @@ module.exports = class IslandCommand extends Command {
}
return false;
};
const vote = await msg.channel.awaitMessages(voteFilter, {
const vote = await msg.channel.awaitMessages({
filter: voteFilter,
max: playersLeft.size,
time: 60000
});
+2 -1
View File
@@ -65,7 +65,8 @@ module.exports = class JengaCommand extends Command {
const j = Number.parseInt(choice, 10) - 1;
return board[j];
};
const turn = await msg.channel.awaitMessages(pickFilter, {
const turn = await msg.channel.awaitMessages({
filter: pickFilter,
max: 1,
time: 60000
});
+2 -1
View File
@@ -76,7 +76,8 @@ module.exports = class LieSwatterCommand extends Command {
}
return false;
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: pts.size,
time: 30000
});
+4 -2
View File
@@ -71,7 +71,8 @@ module.exports = class NimCommand extends Command {
const i = Number.parseInt(choice, 10) - 1;
return board[i] && board[i] > 0;
};
const turn = await msg.channel.awaitMessages(pickFilter, {
const turn = await msg.channel.awaitMessages({
filter: pickFilter,
max: 1,
time: 60000
});
@@ -110,7 +111,8 @@ module.exports = class NimCommand extends Command {
const i = Number.parseInt(chosen, 10);
return i <= row && i > 0;
};
const rowTurn = await msg.channel.awaitMessages(rowFilter, {
const rowTurn = await msg.channel.awaitMessages({
filter: rowFilter,
max: 1,
time: 60000
});
+2 -1
View File
@@ -74,7 +74,8 @@ module.exports = class ObstructionCommand extends Command {
if (!possibleMoves.includes(`${x - 1},${y - 1}`)) return false;
return true;
};
const turn = await msg.channel.awaitMessages(turnFilter, {
const turn = await msg.channel.awaitMessages({
filter: turnFilter,
max: 1,
time: 60000
});
+4 -2
View File
@@ -45,7 +45,8 @@ module.exports = class PickANumberCommand extends Command {
if (!userTurn && num === player1Pick) return false;
return num && nums.includes(num);
};
const player1 = await msg.channel.awaitMessages(filter, {
const player1 = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
@@ -62,7 +63,8 @@ module.exports = class PickANumberCommand extends Command {
} else {
userTurn = false;
await msg.say(`${opponent}, pick a number from 1 to 10, except ${player1Pick}.`);
const player2 = await msg.channel.awaitMessages(filter, {
const player2 = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+1 -1
View File
@@ -275,7 +275,7 @@ module.exports = class PokerCommand extends Command {
}
return false;
};
const msgs = await msg.channel.awaitMessages(filter, { max: 1, time: 60000 });
const msgs = await msg.channel.awaitMessages({ filter, max: 1, time: 60000 });
let choiceAction;
if (msgs.size) {
choiceAction = msgs.first().content.toLowerCase().replace(/[$,]/g, '');
+2 -1
View File
@@ -69,7 +69,8 @@ module.exports = class QuizDuelCommand extends Command {
}
return false;
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: pts.size,
time: 30000
});
+2 -1
View File
@@ -37,7 +37,8 @@ module.exports = class SpamWarCommand extends Command {
await msg.say('You get one point per character in your messages. You get 1 minute to spam.');
await delay(5000);
await msg.say('You have **1 minute** to spam. Go!');
const msgs = await msg.channel.awaitMessages(res => [opponent.id, msg.author.id].includes(res.author.id), {
const msgs = await msg.channel.awaitMessages({
filter: res => [opponent.id, msg.author.id].includes(res.author.id),
time: 60000
});
const authorMsgs = msgs
+2 -1
View File
@@ -60,7 +60,8 @@ module.exports = class TicTacToeCommand extends Command {
if (pick.toLowerCase() === 'end') return true;
return sides.includes(pick) && !taken.includes(pick);
};
const turn = await msg.channel.awaitMessages(filter, {
const turn = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+2 -1
View File
@@ -44,7 +44,8 @@ module.exports = class TypingRaceCommand extends Command {
if (![opponent.id, msg.author.id].includes(res.author.id)) return false;
return res.content.toLowerCase() === sentence;
};
const winner = await msg.channel.awaitMessages(filter, {
const winner = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+2 -1
View File
@@ -72,7 +72,8 @@ module.exports = class WordChainCommand extends Command {
await msg.say(`It's ${player}'s turn! The letter is **${letter}**.`);
const filter = res =>
res.author.id === player.id && /^[a-zA-Z']+$/i.test(res.content) && res.content.length < 50;
const wordChoice = await msg.channel.awaitMessages(filter, {
const wordChoice = await msg.channel.awaitMessages({
filter,
max: 1,
time: time * 1000
});
+2 -1
View File
@@ -54,7 +54,8 @@ module.exports = class WordSpudCommand extends Command {
_Type \`end\` to end the game._
`);
const filter = res => res.author.id === player.id && res.content.length <= 100;
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+2 -1
View File
@@ -48,7 +48,8 @@ module.exports = class TwentyQuestionsCommand extends Command {
${question.answers.map(answer => answer.text).join(' | ')} | End
`);
const filter = res => res.author.id === msg.author.id && answers.includes(res.content.toLowerCase());
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+2 -1
View File
@@ -70,7 +70,8 @@ module.exports = class AnagramicaCommand extends Command {
reactIfAble(res, res.author, SUCCESS_EMOJI_ID, '✅');
return true;
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
time: time * 1000
});
const highScoreGet = await this.client.redis.get('anagramica');
+2 -1
View File
@@ -70,7 +70,8 @@ module.exports = class AnimeScoreCommand extends Command {
if (res.author.id !== msg.author.id) return false;
return Boolean(Number.parseInt(res.content, 10));
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 15000
});
@@ -48,7 +48,8 @@ module.exports = class AntidepressantOrTolkienCommand extends Command {
if (drugResponses.includes(choice) || tolkienResponses.includes(choice)) return true;
return false;
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 15000
});
+2 -1
View File
@@ -51,7 +51,8 @@ module.exports = class BoxChoosingCommand extends Command {
`);
if (line.options) {
const filter = res => res.author.id === msg.author.id && line.options.includes(res.content.toLowerCase());
const choose = await msg.channel.awaitMessages(filter, {
const choose = await msg.channel.awaitMessages({
filter,
max: 1,
time: 120000
});
+2 -1
View File
@@ -41,7 +41,8 @@ module.exports = class CaptchaCommand extends Command {
'**You have 15 seconds, what does the captcha say?**',
{ files: [{ attachment: canvas.toBuffer(), name: 'captcha-quiz.png' }] }
);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 15000
});
+2 -1
View File
@@ -52,7 +52,8 @@ module.exports = class GoogleFeudCommand extends Command {
while (display.includes('???') && tries) {
const embed = this.makeEmbed(question, tries, suggestions, display);
await msg.embed(embed);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 30000
});
+2 -1
View File
@@ -72,7 +72,8 @@ module.exports = class GuessSongCommand extends Command {
dispatcher.once('error', () => this.client.dispatchers.delete(msg.guild.id));
await reactIfAble(msg, this.client.user, '🔉');
await msg.reply('**You have 30 seconds, what song is this?**');
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 30000
});
+2 -1
View File
@@ -58,7 +58,8 @@ module.exports = class HangmanCommand extends Command {
const choice = res.content.toLowerCase();
return res.author.id === msg.author.id && !confirmation.includes(choice) && !incorrect.includes(choice);
};
const guess = await msg.channel.awaitMessages(filter, {
const guess = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+2 -1
View File
@@ -68,7 +68,8 @@ module.exports = class HorseRaceCommand extends Command {
if (!num) return false;
return num > 0 && num <= chosenHorses.length;
};
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+2 -1
View File
@@ -58,7 +58,8 @@ module.exports = class JeopardyCommand extends Command {
await msg.reply(`${category ? `The category is: **${category}**. ` : ''}30 seconds, good luck.`, {
files: [{ attachment: clueCard, name: 'clue-card.png' }]
});
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 30000
});
+2 -1
View File
@@ -41,7 +41,8 @@ module.exports = class MadLibsCommand extends Command {
}
return true;
};
const choice = await msg.channel.awaitMessages(filter, {
const choice = await msg.channel.awaitMessages({
filter,
max: 1,
time: 120000
});
+2 -1
View File
@@ -66,7 +66,8 @@ module.exports = class MathQuizCommand extends Command {
**You have 10 seconds to answer this question.**
${value1} ${operation} ${value2}
`);
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 10000
});
+2 -1
View File
@@ -38,7 +38,8 @@ module.exports = class MemoryCommand extends Command {
await delay(10000);
await memorizeMsg.edit('Type what you saw. Don\'t worry about formatting, just the words.');
const memorizeType = memorize.join(' ');
const msgs = await msg.channel.awaitMessages(res => msg.author.id === res.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => msg.author.id === res.author.id,
max: 1,
time: 30000
});
+2 -1
View File
@@ -64,7 +64,8 @@ module.exports = class MinesweeperCommand extends Command {
if (game.mask[y - 1][x - 1]) return false;
return true;
};
const turn = await msg.channel.awaitMessages(filter, {
const turn = await msg.channel.awaitMessages({
filter,
max: 1,
time: 120000
});
+2 -1
View File
@@ -81,7 +81,8 @@ module.exports = class PokemonAdvantageCommand extends Command {
**You have 15 seconds, who\'s got the type advantage?**
_If the Pokémon are evenly matched, type \`even\`._
`, { files: [attachment] });
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 15000
});
+2 -1
View File
@@ -56,7 +56,8 @@ module.exports = class QuizCommand extends Command {
${shuffled.map((answer, i) => `**${choices[i]}.** ${answer}`).join('\n')}
`);
const filter = res => res.author.id === msg.author.id && choices.includes(res.content.toUpperCase());
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 15000
});
+2 -1
View File
@@ -25,7 +25,8 @@ module.exports = class ReactionTimeCommand extends Command {
await msg.say(`TYPE \`${word.toUpperCase()}\` NOW!`);
const filter = res => msg.author.id === res.author.id && res.content.toLowerCase() === word;
const now = Date.now();
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
max: 1,
time: 30000
});
+2 -1
View File
@@ -62,7 +62,8 @@ module.exports = class SortingHatCommand extends Command {
`);
const filter = res =>
res.author.id === msg.author.id && choices.slice(0, answers.length).includes(res.content.toUpperCase());
const choice = await msg.channel.awaitMessages(filter, {
const choice = await msg.channel.awaitMessages({
filter,
max: 1,
time: 120000
});
+2 -1
View File
@@ -21,7 +21,8 @@ module.exports = class TypingTestCommand extends Command {
files: [{ attachment: this.generateImage(sentence), name: 'typing-test.png' }]
});
const now = Date.now();
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 30000
});
+2 -1
View File
@@ -97,7 +97,8 @@ module.exports = class WhosThatPokemonCryCommand extends Command {
dispatcher.once('error', () => this.client.dispatchers.delete(msg.guild.id));
await reactIfAble(msg, this.client.user, '🔉');
await msg.reply('**You have 15 seconds, who\'s that Pokémon?**');
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 15000
});
+2 -1
View File
@@ -104,7 +104,8 @@ module.exports = class WhosThatPokemonCommand extends Command {
await reactIfAble(msg, this.client.user, '🔉');
}
await msg.reply('**You have 15 seconds, who\'s that Pokémon?**', { files: [attachment] });
const msgs = await msg.channel.awaitMessages(res => res.author.id === msg.author.id, {
const msgs = await msg.channel.awaitMessages({
filter: res => res.author.id === msg.author.id,
max: 1,
time: 15000
});
+2 -1
View File
@@ -36,7 +36,8 @@ module.exports = class WouldYouRatherCommand extends Command {
_Respond with either **1** or **2** to continue._
`);
const filter = res => res.author.id === msg.author.id && choices.includes(res.content.toLowerCase());
const msgs = await msg.channel.awaitMessages(filter, {
const msgs = await msg.channel.awaitMessages({
filter,
time: 30000,
max: 1
});