node.js - How do I prevent Slack RTM from flooding bot with messages on connect? -


i'm trying use slack's rtm receive (and send) messages using rtmclient class included in slack's @slack/client npm package. issue appeared other packages, that's not causing problem.

when i'm running bot, after connecting lots of messages flood in. messages have been sent while ago , have been received previous times ran bot. want bot receive messages sent in runtime.

so, example, want bot respond user says. should that: run bot, user writes something, bot responds. goes like: run bot, bot receives whole (?) chat history , responds that.

i know, check each message if timestamp approximately now, don't think that's recommended. how fix this?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -