mishk0/slack-bot-api

How to make bot mention someone with message?

Opened this issue · 3 comments

Hello, I am having a bit of a problem, I don't know how to make bot mention someone @name. For example I type "hello" and I want the bot to mention me back with the message "hello there".

Help please

Hey,
You have to use message formatting provided by slack.

bot.postMessageToUser('username',"Hey <@userid>, thanks for submitting your report.", params)

and that's all

You're welcome ^^