Choose command with a maximum of two queries

Does anyone know if it’s possible to limit a choose command to two inputs?

!addcom -cd=5 !choose $(eval function r(x){return x[Math.floor(Math.random()*x.length)];}a=$(urlfetch json https://pastebin.com/raw/XXXXXXXX).split(`;`);b=decodeURIComponent(`$(querystring)`).split(`, `);b[0]?r(a)+` `+r(b):` `).

It has to be 200 characters or fewer since it’s to be used on YouTube. This includes the “!addcom -cd=5 !choose.”

Any help is greatly appreciated!
Many thanks to RockettuJanpu for helping me with the original !choose command!

I rewrote the code to limit the inputs and put most of the new code in a paste.

!addcom -cd=5 !choose $(eval p=$(urlfetch json https://pastebin.com/raw/XXXXXXXX);q=decodeURIComponent(`$(querystring)`);$(urlfetch https://pastebin.com/raw/Ck7Z91ms)).

(Btw, “RockettuJanpu”? c: )

1 Like

Thank you so much! :blue_heart:

What happens if more than two queries are used, by the way? Will it just ignore the third, fourth, etc., queries?

Yep, it’ll ignore everything after the second input.

1 Like

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