Comments (8)
This is so @&#$ up! Tried a lot of workarounds and nothing works.
I have over 2000 teams and can't connect to them.
Botkit is obfuscating the 429 response instead of properly propagating it.
"If you go over these limits when using our HTTP based APIs, including Incoming Webhooks, Slack will start returning a HTTP 429 Too Many Requests error, a JSON object containing the number of calls you have been making, and a Retry-After header containing the number of seconds until you can retry."
For that reason, I can't properly handle when the limit is reached.
bot.startRTM(function (err, bot) {
err is not thrown here for 429
@RafaelCosman is there anyway this is finally fixed?!
Either fix this internally or make it easy to detect the problem on bot.startRTM.
For bots with lots of teams this is a huge problem.
from botkit.
This will be very useful, because if you break the limit your bot will be disconnected.
from botkit.
Yes! Maybe the option to override it manually? (for other services)
from botkit.
Anybody worked on this, yet? Slack 'only' allows about 1 message/second.
from botkit.
For now I have solved this in my code like this:
var timeQueue = async.queue(function(task, callback) {
task.func();
setTimeout(callback, task.timeOut);
}, 1);
And to send something:
timeQueue.push({timeOut: 1100, func: function(){
bot.startPrivateConversation({user: member.id}, function(err, convo){
if (err){
console.log('ERR:',err);
}
convo.say('Sorry, PanMan needs to test something. You can disgard this, and send PanMan funny gifs as a reply')
});
}}, function(err) {
// console.log('finished processing item');
});
HTH
from botkit.
I think that's quite a big issue, any news on this? I'd be happy to help if I can.
from botkit.
@tnilles We'd love input. It is an important issue.
However, building a reliable outgoing queue to handle this is not something that would normally belong in a library like Botkit. What do you suggest?
from botkit.
Well, I think this could be confusing to newcomers to botkit/slackapi. The first thing to do would be to mention the issue in the docs, and if you don't intend to add a queue mechanism maybe point the reader to a workaround (like @PanMan did).
Excuse me for asking, but why wouldn't a queue be included into botkit? This seems to be something every botkit user would want (ie. not breaking the bot because of the api limits). I might be wrong, and there's probably a good reason to not do that - but I'm not sure why.
from botkit.
Related Issues (20)
- Send proactive message on MS teams HOT 2
- botkit 4.15.0 and Webex Adapter 1.0.10 are not on NPM HOT 1
- How to upload this Bot to Teams? HOT 2
- Bot can send, but not receive anymore HOT 2
- Botkit Webex API client not returning data HOT 1
- Question: Handling Websocket terminations HOT 1
- Uncatchable throws on botbuilder-adapter-webex registerWebhookSubscription Functions HOT 19
- Conversation become "duplicated" when running long operation HOT 1
- Help in Implementing the B2C Chatbot
- Webex Teams Adapter Doesn't Support direct_mention Event Type
- ☺
- BotkitConversation not executing when using axios but its executing fine when calling inside request?
- Cannot read property '1' of undefined
- Block Action Issue (when 'Clear Selection' is clicked)
- Can I message a pages followers with this??
- Remove deprecated request package
- Is project Dead? HOT 2
- Botkit
- Server Crash due to Missing Credentials in Slack Adapter
- npm install -g yo generator-botkit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from botkit.