Hey everyone!
When you put in the random viewer code, what is the code to get a random answer (that you type into nightbot)?
Hopefully this makes sense and you guys can help!
Thank you all in advance,
Leigha
Help with Nightbot commands
3 replies
You talk about the code to create a own command or one code to create a random answer command in nightbot.tv?
In php the code is:
<?php
$answers = array(
"Answer1",
"Answer2",
"Answer3",
"Answer4"
);
$random =
array rand($answer);
echo $answers[$random];
?>
After doing this, you upload the command to the Internet and make the next command in nightbot
!addcom ![command a name] $(urlfetch [URL of the command you uploaded to the internet])
Hey @Sturdy Pig!
Please use the search bar, it's likely we already covered your question.
I'm thinking this could help, but without a clearer message, we can't help:
/t/use-nightbot-variables-in-pastebin/1534636064776392835#m1534636077959352381