How to mention(ping) user on a Discord channel with web hook
Hello, this is @joviansummer. I've been providing automated hourly report of missed blocks on witness Discord channel.
Considering witness @faisalamin's suggestion, I did some research and test to find out how to mention(ping) discord users when their witness nodes are missing blocks. The reporter process uses web hook to send missed blocks report. Discord's developer document for web hook is at https://discord.com/developers/docs/resources/webhook.
I decided to write this post because it took me a bit of time to figure out how to ping a user. It might be of a little help for anyone interested in working with Discord web hook.
When you use Discord with your web browser, mentioning someone is simple. You just type Discord username with preceding '@'. If you mention Discord user joviansummer for example, you just type @joviansummer just like you do on Steemit.
But when sending a message via web hook, it doesn't work that way. If you send a message like "Hello, @joviansummer" to a Discord channel via web hook, it won't ping. Sending something like "Hello, @everyone" works, but pinging a specific user doesn't.
If you want to ping a user via web hook message, you need to use ID instead of username. ID is a numerical identifier assigned to each user. If ID of joviansummer is 12345, then you need to send message like "Hello, <@12345>" to ping joviansummer.
Here is how you find ID of a specific user. You need to enable "developer mode" from Discord user settings. Go to user settings and to "advanced" settings. There is a switch to enable developer mode. Once developer mode is enabled, you can right-click a Discord user and select "copy user ID".
Now I'm revising the missed block reporter code. It will take a few days to deploy a new version.
Thanks for reading, and have a wonderful day!
@joviansummer's STEEM projects
@jswit witness:
I'm running a STEEM witness node. I'd really appreciate it if you vote for my witness account @jswit. (https://steemitwallet.com/~witnesses)
[ENG] Introducing @jswit witness project
@jsup curation:
[ENG] Introduction to @jsup curation project
[ENG] Using @jsup curation project as an auto-voting agent
[ENG] jsup 2.0 - make your upvote great again
Steemit-Search:
Steemit-Search: a simple website for post searching
jSTEEM:
jSTEEM project - STEEM blockchain explorer on Telegram messenger
"Wow, @joviansummer, you're a rockstar! 🤩 Thank you so much for sharing this super helpful info on how to ping users via Discord webhook! 😊 I'm definitely going to bookmark this post and come back to it when I need to figure out how to do it myself. 👍
It's amazing that you took the time to research and test this, and now we can all benefit from your hard work! 🙏 Thanks for being such an active and engaged member of our Steem community, and for always looking for ways to improve and share your knowledge with others.
And don't forget to keep shining, @joviansummer - you're making a real difference here! 💫
By the way, I just voted for xpilar.witness by going to https://steemitwallet.com/~witnesses. Let's keep supporting each other and growing our community together! 🤝"
@jsup !blog
Blogger url: http://joviansummer.blogspot.com/2024/09/how-to-mentionping-user-on-discord.html
Thank you, friend!
I'm @steem.history, who is steem witness.
Thank you for witnessvoting for me.
please click it!
(Go to https://steemit.com/~witnesses and type fbslo at the bottom of the page)
The weight is reduced because of the lack of Voting Power. If you vote for me as a witness, you can get my little vote.
Upvoted! Thank you for supporting witness @jswit.
Hi @joviansummer, great work! It will certainly benefit all witnesses,
I am already supporting your witness!
You can also include a SteemPro direct witness link
https://www.steempro.com/witnesses#jswit
Thank you, and I already voted for you as witness a long time ago :)
I'm doing the revision step by step. If pinging works correctly with the next revised version, then maybe we could consider adding links.
#supportthedevs
Thank you!