-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disable non-mentionable role mentions #3882
Comments
Role.mentionable is based on the toggle for the role, not if the bot has mention everyone permissions, so that would yield the same result, and the first regex was removed in the first place as it was unreliable, see #3830 |
That's exactly the point though. If the role isn't mentionable, you probably want a way to prevent the bot from accidentally mentioning it because it has MENTION_EVERYONE. |
But in the case of example code provided in opening post, |
The current disableMentions:everyone doesn't check if the bot has mention everyone permission either, so I didn't add one. I also don't think a permissions check would really be necessary as users can easily add one themselves when adding the disableMentions option or just always stay on the save side. |
But that defeats the purpose of having disableMentions, if you have to remember to "tighten up" the message content checks by yourself |
True, but then a permissions check would need to be added to the current Example: |
Bots currently do not have "access" to this new feature where users with the So this is, at least currently, not an issue. On another note, Discord is "working on exposing a new set of fields you can provide when you create a message or post a webhook that will specify what kinds of mentions will be allowed to be processed in a message. " (from discord/discord-api-docs#1286 (comment)) Making this feature, hopefully soon, obsolete. |
The above mentioned feature is live and I linked the relevant PR ^. |
Is your feature request related to a problem? Please describe.
The
disableMentions
function is missing a feature for me. Usingall
breaks all mentions, but usingeveryone
does still mention roles that can only be mentioned with theMENTION_EVERYONE
permission.Describe the ideal solution
Ideally using
disableMentions:'everyone'
would also escape mentions of non-mentionable roles.Describe alternatives you've considered
Adding a fourth option for
disableMentions
would of course work as well but probably requires more coding.Additional context
I wrote myself I small function to escape the mentions, maybe that could be used in some way.
The text was updated successfully, but these errors were encountered: