An /afk command that tells members who ping you that you're away, and welcomes you back when you talk again.
Members use /afk with an optional reason, like /afk lunch, and the bot confirms it and adds [AFK] in front of their nickname.
When someone pings a member who is AFK, the bot replies with their reason and how long ago they went AFK. As soon as the AFK member sends a message, the bot welcomes them back, removes their AFK and takes [AFK] off their nickname. AFK is per server, so being AFK in one server doesn't show in another.
Open one to see its blocks.
Create your bot in Kite for free, then add AFK from the Marketplace in your app and change anything you like in the editor.
Get startedNo. Its replies mention the members by name, but pings are turned off, so the AFK member doesn't get pinged a second time.
The bot needs the Manage Nicknames permission, and its role has to be above yours. It can never change the nickname of the server owner. If [AFK] and your nickname together are longer than 32 characters, Discord's limit, the bot leaves your nickname as it is. AFK still works without the nickname.
The bot answers for one of them, skipping the author. Role pings don't count. Replying to a message of an AFK member counts too, unless the reply has its ping turned off.
Messages cost nothing unless they come from or ping an AFK member. Using /afk costs up to 3 credits, for saving the AFK, replying and changing the nickname. Coming back costs 3 as well, and each reply about an AFK member costs 1.

Build commands by connecting blocks, or describe them and let AI build them. Kite is free to start and hosts your bot 24/7.