New to nightbot <3

New to Nightbot…
Looking to make commands and super new…

  1. How do I pick from a list of options like 1 2 3 outcome
  2. How can I make one of the options a random number generator ?
  3. Can I make one of the options say the user who requested ?

I tried to use the list of variables but I don’t see a clear list and how to use them :frowning:
Thank you!

Yes that’s all possible just tell me what you want all the responses to be and how high you want the random numbers to go to.

Thank you for your help!

I am looking to make 1 - 10 answers possible and still working on the responses. Would it be possible to show me how to write out a command that has 10 possible outcomes that are text and one of the outcomes being: Grug throw (random number 1-10) rocks at Users name.

Is there a better cheat sheet for this type of writing or just ask each time I want to write a command?
Thank you!

What you want is pretty simple I’ll show you the general format.

$(eval 

Random=Math.floor(Math.random()*10+1);
//This is the random number every time you use the command it will make a new number 1-10
//Also after you set something equal to something else put a semicolon at the end of it so it knows where it ends.

Response=[`Response1`,
//Since there’s more responses after this one you put a comma after the backticks.

`Response2`,
`...`,
//Just do this for as many responses you want two back ticks and a comma.

`Response10 ${Random}`];
//This inserts the random number into the response also it has an ending bracket since it’s the last one

Response[Math.floor(Math.random()*Response.length)])
//This is the final message it outputs it’s picking randomly from the responses.

This should be everything you need to know about how to format the command you want.

Feel free to ask me any questions.

1 Like

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