Refactor mention check with more appropriate method

This commit is contained in:
walcutt 2022-07-02 16:31:37 -04:00
parent d38dc81fb3
commit fc4452bf7c

View File

@ -186,11 +186,9 @@ function generate_messages(text) {
}
function userInMentions(user, message) {
let matchingUser = message.mentions.users.find(
return message.mentions.users.some(
u => u === user
);
return matchingUser !== undefined;
}
client.on('messageCreate', (message) => {