simple-slack-api icon indicating copy to clipboard operation
simple-slack-api copied to clipboard

Question. How to uses Mentions, aka @here, @channel

Open fernandothefreeosk opened this issue 6 years ago • 1 comments

Hello,

I am trying to send a message to a channel in Slack. I will like to use mentions, like the mention @channel. How Can I do it?

I tried this: SlackSession session = SlackSessionFactory.createWebSocketSlackSession("my-token"); session.connect(); SlackChannel channel = session.findChannelByName("my_channel"); session.sendMessage(channel, "@channel Hello world, I am a bot. Testing Java app to post in Slack, ignore this message" );

The word "@channel" doesn't appear in slack when I see the message, but also the people on that channel don't get the notification or alert about the new message that was posted on the channel.

fernandothefreeosk avatar Mar 26 '18 20:03 fernandothefreeosk

You can use mentions like this: <@USER_OR_CHAN_ID_HERE>

bittiez avatar Mar 31 '18 15:03 bittiez