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

Typing indicators for Slack Bot

Open joinjoohny opened this issue 7 years ago • 1 comments

Hi guys, can you help me understand, how to implement typing indicators. When a user speaks a bot, and if the bot processes the request, we need to show typing.

Slack doc say: Clients can send a typing indicator to indicate that the user is currently writing a message to send to a channel: { "id": 1, "type": "typing", "channel": "C024BE91L" }

Thank you for any help!

joinjoohny avatar Mar 09 '17 15:03 joinjoohny

Solution:

bot.on('open', data => {
   bot.ws.send(JSON.stringify({ type: 'typing', channel: channelid }));
});

joinjoohny avatar Mar 09 '17 16:03 joinjoohny