Warp World Commands with Streamlabs Cloudbot?

Hello.

I was wondering if Warp World bot commands are compatible with Streamlabs Cloudbot (https://streamlabs.com/dashboard#/cloudbot)?

I’m trying to use the following syntax for the !add command with Cloudbot:
{readapi.https://warp.world/bot/allow?streamer=gozen_&key=MYKEY&submitter={user.name}&allowuser={command}}

However, when I issue an !add command in chat, I receive the following response: [Bad Server Response / Too slow]

I wasn’t sure if there is a problem with my syntax or if there is an incompatibility between Warp World and Cloudbot.

A list of Cloudbot variables can be found here: https://streamlabs.com/dashboard#/cloudbot/commands/variables

The custom commands they have listed at the URL include:
{arg}
Replaced by a word in a specific position, arg is denoted by a number.

{channel.name}
Replaces {channel.name} with your Channel name.

{command}
Replaces {command} with current command that’s being used.

{donation.link}
Replaces {donation.link} with your Streamlabs donation link.

{facemask.link}
Replaces {facemask.link} with your Streamlabs Facemask Donation link.

{merch.link}
Replaces {merch.link} with your Streamlabs Merch link.

{randnum.-}
Replaces {randnum.-} variable the random number between min & max.

{readapi.<url_here>}
Replaces {readapi.<url_here>} variable with the data from the API endpoint.

{start:end}
Replaced with all the words between the start and end.

{target.name}
Replaces {target.name} variable with the target’s name.

{time./}
Replaces {time./} variable with the current time for that specific continent/city.

{uptime}
Replaces {uptime} with how long the stream has been live for. (Twitch/Mixer only)

{user.id}
Replaces {user.id} variable with the id of the current user.

{user.name}
Replaces {user.name} variable with the viewers name.

Thank you!

Our commands should work. It sounds like it might be hitting a timeout issue, I’m not sure what StreamLabs has for timeout set but most of our commands are under 2 seconds so it should be able to handle them.

Try one of the simple commands like queue and see if that responds fast enough. Add should work but this will give us a better idea on timeout requirements.

Thanks, Jaku.

I just created a command for !queue: {readapi.https://warp.world/bot/queue?streamer=gozen_&key=KEY&submitter={user.name}&q={command}}

I am still receiving the same reply from Cloudbot (Streamlabs) after invoking the command:
[Bad Server Response / Too slow]

That’s really odd, that response is less than half a second. That should not be timing out in any case.

We will have to look into this a bit more, but it seems to be more on a StreamLabs side.

1 Like

Hi Jaku,

I reached out to StreamLabs support via email this morning. I heard back from Ed, who told me he spoke to the Cloudbot devs, and they told him them the reason the commands are not working is due to an issue on Warp World’s side.

I wasn’t provided with any other technical details on how they came to that conclusion, but I have reached back out to Ed to see if he was, or can be provided, with any other details that I can share that may be of assistance.

Thank you.

I would expect them to blame us, but the fact that the commands work for every other bot and cloud service says differently.

I’m not really able to help further with this as the issue they are responding with doesn’t tell us enough. If they could tell us that we need to send different headers back or anything like that I would be willing to make changes, but the error with “too slow” doesn’t make any sense as the endpoints typically return info within half a second. If you can get any other technical replies back from them that would be great.

Thank you, Jaku.

I have just replied back to the ticket I had open asking for any additional technical details that can provide and mentioned the information you shared in your post.

I also just posted in the official Streamlabs Chatbot > chatbot-support channel on Discord with all of the information I previously provided and the information you provided.

The Streamlabs Chatbot Discord server where I posted the info is: https://discord.gg/xFcsxft I made the post today, 6/21/2019 at 9:10 AM (eastern time).

If/when I hear anything back, I’ll be sure to post it here.

Thanks again!

Hi Jaku.

I just heard back from Streamlabs support.

Their exact response was:
“The warp server is sending a 406 error on the Accept Header. It seems they’re unable to return a response in plain text for us.”

They also included the attached screenshot:

Thank you.

Great. We can work with that, now that we require plain-text response.

1 Like

Awesome If you need me to do any testing at some point with Cloudbot, or if you need additional information from Streamlabs Cloubot support, please let me know. Thanks!

1 Like

This is silly. But is actually might be the easiest.

Just change everything like /bot/queue? to /bot/queue.php?

Adding the .php to all Warp World commands seems to have done the trick! Thanks!

I did also make a change to the commands to use a different variable, target.name, as the one I was using previously, command, was not working correctly.

My !add command originally looked like:
{readapi.https://warp.world/bot/add.php?streamer=gozen_&key=KEY&submitter={user.name}&levelcode={command}}

My !add command now looks like:
{readapi.https://warp.world/bot/add.php?streamer=gozen_&key=KEY&submitter={user.name}&levelcode={target.name}}

From my testing, all Warp World commands are executing correctly via Cloudbot/Streamlabs, however I am still noticing one issue.

When a command is used to invoke a level code, commands such as !add, !replace, !submit, Cloudbot/Streamlabs replies with [Bad Server Response / Too slow], however, when I check on the Warp World site, the command did actually execute successfully.

Example:
User: !add F56A-0000-005E-E5FF
Streamlabs: [Bad Server Response / Too slow]
(However the level did go through and is in the actual queue. The user can also see this if they attempt re-enter their level code right after they see the bad server response / too slow message.)
User: !add F56A-0000-005E-E5FF
Streamlabs: @user looks like you have reached the max amount of submissions. Wait until one of your levels is completed!

It does also appear that if a user attempts to add a level that doesn’t exist or was previously submitted, that a typical response does happen:
User: !add C383-0000-000D-F639
Streamlabs: @user Sorry that level doesn’t seem to exist! Check your code again!
User: !add B71C-0000-0088-A4E4
Streamlabs: That level was previously submitted! @gozen_ already beat it!

I’ve also noticed the same message, a few times, when I test the !close command. There are times where I will see “bad server response / too slow” response from the bot, even thought the queue did actually close. However, I also have been able to run !close and the bot will reply with “Submissions are now closed!”. This seems to be hit or miss where the !add, !replace, and !submit all seem to happen consistently with the “bad server response / too slow” message.

Other commands that users can invoke, always seem to get an immediate response with no “bad server response / too slow” message. Commands such as !clears, !current, !list, !queue, !remove, and !stats.

Outside of seeing the [Bad Server Response / Too slow] response after invoking certain commands, everything seems to be functioning normally.

I’d be interested in knowing what StreamLabs Cloudbot timeout is. When you run the URLs directly do you see a response time within 1-2 seconds? Or does it hang?

The entries/commands still work since it’s hitting our service and the service is then doing the work. But StreamLabs is getting impatient and can’t wait for the server to respond. Normally these services have like a 8 second timeout.

I just did some testing using the stopwatch on my phone, it seems for the commands that yield a “too slow” response take approximately between 3 to 4 seconds for StreamLabs Cloubot to reply. All other commands that don’t yield the “too slow” seem to come back between 1 to 2 seconds. During one attempt using !add, I did get a reply that the level was added at the time for the response was ~2.62 seconds. Seems like the threshold for StreamLabs Cloudbot might be ~3 seconds before it comes back with a “too slow” reply.

Yeah, not much we can do about that then. Most other bots allow for 5-10 seconds with 8 being about the average. 3 seconds seems like a problem.

The old queue does a lot of stuff, and we’ve done a lot to optimize it, but it’s at the mercy of the bookmark site which takes about 2 seconds on average. We’ve implemented a cache system so that levels added to a queue previously in the last hour or so don’t need to look up on the bookmark site, but that doesn’t help much.

I appreciate all of the help and fast replies on this! Thanks you! :slight_smile:

I did reach out to StreamLabs support again to see if they can up that timeout value, which I doubt they will do just for me, but I figured I might as well ask.

I had previously been using Botisimo for Warp World commands, since you helped last fall to get the commands working with it, and it has been working great. I just recently learned of Cloudbot, and saw it offered some additional features that Botisimo didn’t have, namely the ability for users to not be able to issue commands without having a set amount of loyalty points, which is why I thought I would attempt to see if Warp World commands would work with it. The main reason I looked into both of these bots to use with Warp World, as opposed to Nightbot or the like, is because I typically multi-stream to Twitch, YouTube, and Mixer and both Botisimo and Cloudbot allow you to integrate all 3 streaming services and commands together, thus making it easier for myself and users to submit levels from any platform.

In the chance that a cloud based bot can work in the future with SMM2 level submissions, I am planning on continuing to use Botisimo or Cloudbot (should the timeout threshold get increased) which is the main reason I was curious to see why I couldn’t get Cloudbot to work initially. The multi-queue has been working great now though with SMM2 viewer level submissions and I’ve just been informing users that any levels have to be submitted via Twitch chat.

Thank you again for all of the help and your hard work!