mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 23:05:04 +02:00
Fix for awaitMessages, Util
This commit is contained in:
@@ -46,7 +46,8 @@ module.exports = class Battler {
|
||||
}
|
||||
return false;
|
||||
};
|
||||
const turn = await msg.channel.awaitMessages(filter, {
|
||||
const turn = await msg.channel.awaitMessages({
|
||||
filter,
|
||||
max: 1,
|
||||
time: 30000
|
||||
});
|
||||
|
||||
@@ -71,7 +71,8 @@ module.exports = class Game {
|
||||
reactIfAble(res, res.author, SUCCESS_EMOJI_ID, '✅');
|
||||
return true;
|
||||
};
|
||||
const votes = await this.channel.awaitMessages(filter, {
|
||||
const votes = await this.channel.awaitMessages({
|
||||
filter,
|
||||
max: this.players.size,
|
||||
time: 90000
|
||||
});
|
||||
|
||||
@@ -23,7 +23,8 @@ module.exports = class Player {
|
||||
${valid.map((p, i) => `**${i + 1}.** ${p.user.tag}`).join('\n')}
|
||||
`);
|
||||
const filter = res => valid[Number.parseInt(res.content, 10) - 1];
|
||||
const decision = await this.user.dmChannel.awaitMessages(filter, {
|
||||
const decision = await this.user.dmChannel.awaitMessages({
|
||||
filter,
|
||||
max: 1,
|
||||
time: 120000
|
||||
});
|
||||
|
||||
@@ -84,7 +84,8 @@ module.exports = class PhoneCall {
|
||||
const voicemailValidation = await verify(this.origin, null);
|
||||
if (voicemailValidation) {
|
||||
await this.origin.send('☎️ Please leave your message (max 280 characters) after the beep. _Beep_.');
|
||||
const voicemail = await this.origin.awaitMessages(res => res.content && res.content.length <= 280, {
|
||||
const voicemail = await this.origin.awaitMessages({
|
||||
filter: res => res.content && res.content.length <= 280,
|
||||
time: 30000,
|
||||
max: 1
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user