An API endpoint that toggles open-close status (clopen?)

Okay, listen. I know it ain’t hard to keep track of whether a queue is open or closed, but hear me out anyways.

I propose a new endpoint on the api similar to bot/open and bot/close called something like “clopen” (or something less dumb) that simply toggles the status of queue to make it so people don’t have to pay as much attention to these things.

I’m not saying replacing the open and close endpoints with this new “clopen” command (seriously, if you do do this, come up with a less dumb name than the one I did). After all, it will still be good to definitively open or close the queue.

Really at this point, I am just padding this message because the request is a simple one (akin to the mind it came from) but I didn’t want it to look bad by using just a single line.

Hope you have a good day.

1 Like

I’m kinda questioning the overall usefulness of this, especially compared to the mentioned previously-existing open and close commands. I feel like if you ever want the queue status changed it’ll always be easier to just explicitly say what you want, especially cause you won’t have to remember what the previous 8s status was.
I just feel like there is no real point in having a clopen command when using open or close is so easy already.

Though, if it does get made the command should probably be like !Toggle or !qToggle

2 Likes

I agree with @jgelvar and am not sure I see any use of this. If you wanna open or close the queue you just hit !open/!close without having to know the previous status. If you want to close it but it’s already closed then you’d end up opening it instead?

In case you want to make this a custom command you could get your current queue status from the api.

var queue = get("http://api.warp.world/ponglesesquire");
var boturl = "http://warp.world/bot/" + (queue.queue_settings.queue_status ? "close" : "open");
get(boturl); // dont forget your username and secretkey.
3 Likes

D’oh, I didn’t think about getting the status of the queue. I feel a bit silly now.

1 Like

At least there is an upside to this forum topic: you can point people to it in the future if they ask for the same thing.

Feel free to lock the topic if you want.

1 Like

This can be achieved with the example posted earlier or (somewhat) with this new feature.
locks

2 Likes