edomango
edomango
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
const orderedMentions = [...message.content.matchAll(/<@!?(\d+)>/g)].map(match => match[1])
const membersMentioned = await interaction.guild!.members.fetch({ user: orderedMentions })

if(!membersMentioned) return;

for(const memberId of orderedMentions) {
const member = membersMentioned.get(memberId)
if (!member) return;
players.push({
name:member.nickname || member.displayName,
id:memberId
})
}
const orderedMentions = [...message.content.matchAll(/<@!?(\d+)>/g)].map(match => match[1])
const membersMentioned = await interaction.guild!.members.fetch({ user: orderedMentions })

if(!membersMentioned) return;

for(const memberId of orderedMentions) {
const member = membersMentioned.get(memberId)
if (!member) return;
players.push({
name:member.nickname || member.displayName,
id:memberId
})
}
solved but I don't know if it is overkill
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
But fetch changes the order
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
is ordered
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
I've verified that
[...message.content.matchAll(/<@!?(\d+)>/g)].map(match => match[1])
[...message.content.matchAll(/<@!?(\d+)>/g)].map(match => match[1])
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
const membersMentioned = await interaction.guild!.members.fetch({ user: [...message.content.matchAll(/<@!?(\d+)>/g)].map(match => match[1]) })
const membersMentioned = await interaction.guild!.members.fetch({ user: [...message.content.matchAll(/<@!?(\d+)>/g)].map(match => match[1]) })
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
I have also tried with regex , but fetching changes the order
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
Pls tell me there is a way other than using members...
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
It works , but it doesn't keep the order of mentions
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
For a server of almost 30 k members I shouldn't cache right ?
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
And I let u know if it worked
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
Thank you very much I’m changing the code
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
Wow didn’t know I could fetch multiple users
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
So what should I do 😭
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
Already mentioned
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
There could be 16 mentions
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
Doesn’t seem rate limit friendly if I increase users mentions
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
Like should I consider users collection and then fetch for each user the guild member?
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
How can I solve this
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
Suca | 21
C: @edomango
CV: <@521085980451799079>
2
1
Suca | 21
C: @edomango
CV: <@521085980451799079>
2
1
35 replies
DIAdiscord.js - Imagine an app
Created by edomango on 7/19/2024 in #djs-questions
Bug of discord.js Message.mentions.members . Doesn't include all mentioned members.
and this is the output
35 replies