discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Role mentions in slash command interaction responses not working

Open gc opened this issue 3 years ago • 6 comments

Description

There was a change recently changing how webhooks/interaction responses permissions work, allowing them to have the permissions of the bot account, instead of the base/everyone permissions, and so be able to mention everyone/roles. So this issue is based on the assumption it was attempted to be fixed already.

After this change, I tested in every such way, trying to get this to work, and I cant get it to work. My goal was to ping a role with a slash interaction response.

  • Verified through app_permissions that I have both mention_everyone, and admin.
  • Passing allowed_mentions, trying both roles: [id] and the parse option.
  • Kicking the bot, reinviting with the right permissions, giving admin, giving all permissions, etc.

Several other users have come forward with the same issue, and I haven't been able to find anyone that can show they can get this to work.

Steps to Reproduce

Attempt to ping a specific role in a slash command interaction response, remembering to ensure you have the right permissions and pass allowed_mentions

Expected Behavior

The role should be pinged, because we have permission and are allowing the mention.

Current Behavior

Nothing is pinged.

Screenshots/Videos

unknown unknown

Client and System Information

Stable 140091 (235bdc1) Windows 10 64-Bit (10.0.19044) My own library

gc avatar Aug 06 '22 05:08 gc

I am having the same issue, ~~it seems to be related to the Discord server, not the bot. I have a test server for my bots where the new feature works, however when I use the exact same setup on a different server it does not work. Same bot, same permissions, different results.~~ Update: I was mistaken, the everyone role had perms for messaging everyone on that server from earlier testing. So the issue exists regardless of server.

I thought that maybe the bot has to be remade or something so I recreated it in the Discord developer portal but the new one I made had the exact same behaviour.

KarlOfDuty avatar Aug 06 '22 20:08 KarlOfDuty

I looked into this for user pinging, I assume it's the same for role pinging. iirc if you defer the interaction first it won't ping

nmsturcke avatar Aug 06 '22 23:08 nmsturcke

I looked into this for user pinging, I assume it's the same for role pinging. iirc if you defer the interaction first it won't ping

I have not deferred the interaction, and it still won't ping.

KarlOfDuty avatar Aug 07 '22 08:08 KarlOfDuty

As responses work the same as webhooks, the @everyone role must have permissions to mention @everyone, @here and All Roles.

image image

nmsturcke avatar Aug 07 '22 10:08 nmsturcke

As responses work the same as webhooks, the @everyone role must have permissions to mention @everyone, @here and All Roles.

image image

But this was changed recently.

ooliver1 avatar Aug 07 '22 11:08 ooliver1

As the above comment says, and as I mention in my issue, it was apparently already fixed/changed - and this issue is saying it wasn't fixed. Either way its a ridiculous suggestion to let everyone mention everyone.

gc avatar Aug 07 '22 11:08 gc

This should be fixed now

yonilerner avatar Oct 06 '22 21:10 yonilerner

This also happens for users it seems.

Kaisarion avatar Feb 05 '23 01:02 Kaisarion