Receiving too many requests in my Bot user from slack

痞子三分冷 提交于 2019-12-17 21:15:28

问题


I am trying to implement a bot user in slack, but right now when i send a message to slack as a user, my bot gets more messages requests than it should.

The event that I have added to my bot user is message.groups. I don't know if the events can interferer with the normal flow of the conversation.

In this log USER REQUEST is what the user sent to the bot and BOT AWSER is what bot sends. As you can see slack is receiving the same message (event_time is the same) two times in a row, when i send just one message to the channel.

Can someone tell me if this is my problem and not slack problem? What can I do to revert this situation and begin to receive only the messages I post to slack instead of getting repeated messages?


回答1:


No, that is normal behavior. Your bot will receive all message send to the channels your bot is in, including the messages the bot is sending himself. The only way to deal with this in my experience is to to filter out unwanted messages in your bot to avoid loops and double-processing of messages.



来源:https://stackoverflow.com/questions/44416696/receiving-too-many-requests-in-my-bot-user-from-slack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!