Nightbot fight command

Asked May 10, 2020·4 replies·Last activity 6 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.

Hello guys im having some problem with !fight command
i have this command $(user) fought $(touser) and $(urlfetch https://api.rtainc.co/twitch/random?format=[0]&choices=won by KO,lost by submission).
but it gives erro, and i cant make it work can someone help

4 replies

Hiya, something like this: ``!commands add !fight $(user) fought $(touser) and $(eval a=[won by KO,lost by submission]; a[Math.floor(Math.random()*a.length)])``

i was making some tests because the command isnt for me is to a streamer that i am mod
and it happened this, i has always winning

Sem_Titulo.png

Hey @Vivid Crab!

The code is correct, but since it's a 50/50 chance, it would not be surprising you won 4 times in a row.