slack-bot-api
slack-bot-api copied to clipboard
Typing indicators for Slack Bot
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!
Solution:
bot.on('open', data => {
bot.ws.send(JSON.stringify({ type: 'typing', channel: channelid }));
});