Just curious as to what the timeout is on the UrlFetch function as it appears to be timing out too quick on some commands to Warp World’s custom api (Notably the !next and !rand ones, which are a bit slower than the rest).
Bonus points if there is a way to extend the timeout on a command by command basis!
Because calling remote APIs is expensive, we place a timeout of 10 seconds on them. If your API does not respond in 10 seconds, you should return early and use the asynchronous response url header to send a reply.
Thanks for the reply Night!
I’ve gotten the callbacks to work, and that’s all good. But now I am wondering if there is a way on Nightbot’s side to surpress the “Error Connecting To Remote Server” that happens when Nightbot gives up on waiting for a response from the api in question.
Any help will be appreciated
Typically you would want to return a response to the user (stating that the response is being generated) and then execute the expensive logic outside of the request.
What I am working on is a way to mimic how the api works for other twitch bots so I won’t be adding in extra lines, I just want no response instead.
Plus, I am attempting to process the expensive logic outside the request but am having troubles with it and only getting responses about what headers Nightbot sends instead of help towards fixing the issue. All I want is for Nightbot to call the API without saying anything in the chat until the callback url is used.
Unfortunately what you want is a terrible user experience. When users are waiting more than a few seconds for a reply it’s not an ideal experience at all for them.
I am not asking you to tell me what you think people typically do or what you think what an ideal experience is, what I am asking for is a way to suppress the errors that Night bot shows in the user chat on the stream. You may think that an extra second of wait is worse than users gets wrongful errors, however I feel differently.
If there isn’t a way to get Nightbot to work properly and give the same results as the other twitch bots then fine, I’ll stop work on this project. All I was attempting to do was let Nightbot users stay Nightbot users instead of having to switch bots just because a popular API was a second too slow for you.
Also, you know what else is bad user experience? Not actually answering questions and instead telling the user that they are wrong.
Well unfortunately we’re not willing to support your desired implementation. We have already set expectations for remote APIs and do not give any fucks for what other bots do. If APIs are not fast enough it’s not our problem. We ensure users always get a response in a timely manner.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.