!length command

Asked May 15, 2021·3 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.
I want to make a command where you say !length and you get one of three responses based off of a random number generator 1-20.
How this will work is I want a random number generator 1-20 if you get 1-5 i want the message to say "(user) is (eval) inches long, thats kind of pitiful man."
If you get 6-10 then i want it to say "(user) is (eval) inches long, Near average but not chad worthy."
If you get 11-20 then i want it to say "(user) IS (eval) FEET LONG WHAT A CHAD!!"

I dont know if this is possible but i think its a really fun idea for a command thanks for any help you can offer!

3 replies

To anyone looing at this document who are stumped about making this possible im not sure if it helps but if you go to a website called pastebin then that helps i have used it for other commands however i don't know how to code for nightbot or really at all so thats why im on here

Hey @Sparkly Dolphin!

You don't need to use Pastebin here, this should do what you're looking for:

$(eval r=Math.floor(Math.random()*20)+1; r<6?`$(user) is ${r} inches long, thats kind of pitiful man.`:r<11?`$(user) is ${r} inches long, Near average but not chad worthy.`:`$(user) IS ${r} FEET LONG WHAT A CHAD!!`)

Thanks i had made a small prototype version but i wanted to make an improved version this helped alot!