Bot Mention Handler
The mention handler is executed and renders a response when a bot is "mentioned" in a chat or channel. The mentions handler when triggered passes the following attributes to a deluge code. They are:
- Message
- Mentions
- User
- Chat
Attribute Name | Description |
message | Details of the message where the bot is mentioned. |
mentions | Details of the bot mentioned. |
user | Information of the user mentioning the bot. |
chat | Chat details where the bot is mentioned. |
location | Details of the current location of the user. |
Example:
Let us consider an Op Bot built by the Operations Team, which helps you connect to the front desk easily or informs you about a package that was delivered in your name. A sample syntax for the Op Bot's mention handler is given below. This handler is triggered when the bot is mentioned in any conversation!
//Sample Syntax for Bot Mention Handler
response = Map();
response.put("text","Hey! Thanks *" + user.get("first_name") + "* for mentioning me here. I can help you get in touch with the *Front Desk* easily or book your *Shuttle* , to name a few! Take a look at my *Actions* menu to get an idea about my responsibilities. :cool: ");
return response;
Articles:
Cliq Bots - How to involve bots in your conversation and increase productivity
Take a look at how the Desk Bot helps in getting details of a ticket instantly from Zoho Desk!