components v2 embed

Hey guys, I found an issue with the components v2 embed whenever there’s a role mention or a user mention, it actually triggers a notification, unlike the old embed system. I did some research but couldn’t find any option to enable or disable these notifications. What’s the solution for this?
14 Replies
d.js toolkit
d.js toolkit2mo ago
Inky
Inky2mo ago
Use allowedMentions to control either the types of mentions allowed, or specific mentions by id allowed
d.js docs
d.js docs2mo ago
You can control which entities receive notifications via the allowedMentions option. You can: - Set a default on the client - Set for a specific message - Use the repliedUser key to disable in-line reply mentions
{ ..., allowedMentions: { parse: ["users", "roles"] } }
{ ..., allowedMentions: { parse: ["users", "roles"] } }
Ryo.
Ryo.OP2mo ago
That does work, but the problem is it disables all mentions globally, including normal messages, not just the embeds. I only want to prevent mentions from triggering notifications inside the v2 embed, without affecting regular messages.
Inky
Inky2mo ago
You can specify which mentions to ping Wdym actually? You should be specifying allowedMentions when you send the message/reply
Ryo.
Ryo.OP2mo ago
Can it be enabled or disabled in a specific message only? If yes, can u send an example of the method?
Inky
Inky2mo ago
Yea. That’s the only way I recommend doing it channel.send({ allowedMentions: {…} })
Ryo.
Ryo.OP2mo ago
thx bro
Ivan
Ivan5w ago
I think what he meant to say is with allowedMentions, you'd forbid or allow mentions throughout the entirety of the message (including in a TextDisplay component and a Container component). However, OP wants to allow a mention in the TextDisplay component part and not the Container component part.
Ivan
Ivan5w ago
No description
Ivan
Ivan5w ago
To my knowledge, I don't think that's possible? Only solution would be to send two messages in quick succession where one has the allowedMentions parameter and the other doesn't.
Amgelo
Amgelo5w ago
they were already answered, so no, that wasn't what they were looking for
d.js toolkit
d.js toolkit5w ago
The issue has been marked as solved by support staff

Did you find this page helpful?