I’ve got a problem. I tried to make universal random command, which would get a random one of five or less arguments. I made a script already (not tested yet), tried to add this command in my channel for test, but there was a big problem: max command length is only 250. Is there a way to make the max length bigger, or anything like this? Probably no, but it’s always worth trying.
But I’ve got an idea. I’ll give you a script and You can take it, if u want, but please, if someone would know how to make it shorter (i think it’s possible, but i don’t know how) or see any mistakes, please tell me how or send the repaired version of script.
var w1 = ‘$(1)’;w2 = ‘$(2)’;w3 = ‘$(3)’;w4 = ‘$(4)’;w5 = ‘$(5)’; if (w5 != ‘’) {const responses = [’$(1)’, ‘$(2)’, ‘$(3)’, ‘$(4)’, ‘$(5)’]; responses[Math.floor(Math.random() responses.length)];} else {if (w4 != ‘’) {const responses = [’$(1)’, ‘$(2)’, ‘$(3)’, ‘$(4)’]; responses[Math.floor(Math.random() responses.length)];} else {if (w3 != ‘’) {const responses = [’$(1)’, ‘$(2)’, ‘$(3)’]; responses[Math.floor(Math.random() responses.length)];)} else {if (w2 != ‘’) const responses = [’$(1)’, ‘$(2)’]; responses[Math.floor(Math.random() responses.length)];)} else {‘Enter more arguments.’;};};}
PS: JavaScript syntax is sick!