Discord – How to get a webhook to ping roles, users, channels and other items

Discord allows you to post messages from other websites and apps using Webhooks which is really useful, in the past I’ve used it from IFTTT and also linked into google calendar to share messages between them. What do you do if you want to get a webhook to ping roles or users at the same time it posts a message?

Well you need to use a special syntax to mention channels/users/roles etc in a webhook. For channels and users you should be able to use <@CHANNELID> and <@USERID>. To grab the IDs you need to go to settings->advanced then turn on developer mode. Once you have done that just right click a user or channel and hit “Copy ID”. Just paste it with the above so it looks something like <@684309756589074816>.

For roles its a similar approach to the above but you need to use <@&ROLEID> to get it working. You can also use it for other things like emojis if you need to for any reason! It took me a while to work it out so thought I would post here and I hope this helps someone.

5 thoughts on “Discord – How to get a webhook to ping roles, users, channels and other items”

  1. I did what was required, but every time I tried pinging roles using it would always ping the role, but it showed as @role. How do fix it to make it say, for example, @Admin?

    1. To grab the IDs you need to go to settings -> advanced then turn on developer mode. Then right click the server, go to server settings -> roles. Right click the role you want to mention then hit “Copy ID”. You should then be able to use the role ID inside <@&ROLEID>. Hope that helps

  2. I wanna know. how can i ping someone who joins new? i would like to ping someone who just joined whats the command for that?

    1. You can set Discord to send a random welcome message in server settings -> Overview -> Send a random welcome message when someone joins this server. If you want anything specific then you may need to use a bot like MEE6 which can be set up to send people a specific message and ping them.

Leave a Reply

Your email address will not be published. Required fields are marked *