Fix for awaitMessages, Util

This commit is contained in:
Dragon Fire
2024-03-19 23:50:10 -04:00
parent cec26b124e
commit e93556e87b
6 changed files with 15 additions and 10 deletions
+3 -2
View File
@@ -302,7 +302,8 @@ module.exports = class Util {
return (user ? res.author.id === user.id : true)
&& (yes.includes(value) || no.includes(value) || extraYes.includes(value) || extraNo.includes(value));
};
const verify = await channel.awaitMessages(filter, {
const verify = await channel.awaitMessages({
filter,
max: 1,
time
});
@@ -325,7 +326,7 @@ module.exports = class Util {
if (!num) return false;
return num > 0 && num <= arr.length;
};
const msgs = await msg.channel.awaitMessages(filter, { max: 1, time });
const msgs = await msg.channel.awaitMessages({ filter, max: 1, time });
if (!msgs.size) return defalt;
return arr[Number.parseInt(msgs.first().content, 10) - 1];
}