Timers API broken

When trying to change a timer using the api, it’s no longer possible to change the interval, before i was using custom intervals like 15 * * * *, to make it write ONCE every hour at 15, essentially spacing out all my timers.
I wanted to add another timer, and added it using the website, then trying to use the api to change the interval on it, no luck, no matter what it just responds “invalid interval”, even if i try to set it to the same */15 * * * * that it is already set to?

Also it would be really nice if you could make it so that if you send messages using channel_send api that it could parse tags like usual.
Like if you send $(channel) it will write channel name in the message instead of outputting the raw input of $(channel)

We haven’t made any changes to the API for this, and our control panel uses the same exact API (and format) for setting/updating timers. If you have an example failing request body perhaps I can point out your mistake, but I would guess it to be a bad request (not an API issue).

Variable parsing is unfortunately part of the commands pipeline. Sending messages through our API bypasses that Nightbot service entirely, making this non-trivial to change

I figured out what was wrong, i was using a program called Insomnia for sending the data, and for some reason it wasn’t automatically setting Content-Type header, even tho you select JSON, form data etc. in a dropdown. You had to manually enable the content-type header, which was the reason it didn’t work… I was just puzzled why it replied back with:
“status”: 400,
“message”: “Invalid interval”
In this case it should probably reply with something else like: unknown content-type or something :stuck_out_tongue:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.