How to do command duel?

Hello, a few days ago we eliminated the !duel command due to errors and we would like to have it again, can someone help me with the necessary data to enter it again please (I’m new to this T.T)
thank you

Hiya, you will have to be more specific. What is this !duel command, what is the output you want?

Heya :slight_smile:

Just a thought - You don’t mean the !duel in StreamElements do you ? If you do then I’m afraid you have posted on the wrong bot forum !!!

All the best,

Zoe

Hi,
I’m talking about the nightbot duel/duelo command, it is the only bot we use. We had the command but it stopped working so I was asking for help to put it back.
Thanks for answering

Hi,
Of course I’ll be more specific, I’m talking about the command, it’s better known as a duel to the death with knives. When someone entered the command he sent an error text (I don’t remember what the text said) after that error they deleted it. In my chat (in this case Twich) it tends to be used a lot and that’s why I was looking for help to get it back.
If you require more specifications, tell me which ones to make it easier for me, I am new to these commands and I want to learn.

they meant what was the original output when the command was working… but if i had to guess, i’m guessing that it picked a random viewer to duel? (guess based on the broken api that used to give a random viewer before twitch made it so u need permissions to access that info… and yes there is a new api that u need to sign into to give it the permissions it needs for that function)… but we still need to know what else the command is meant to say/do

1 Like

If you want the command for nightbot there it is: $(urlfetch https://vxrl.xyz/smm/$(eval var u=“$(touser)”;if(“$(user)”==u){var u=“$(urlfetch https://2g.be/twitch/randomviewer.php?channel=CANAL)”;}“$(user) has challenged “+u+” to a death duel with knives”)/$(eval “The fight is difficult, but both know that there can only be one winner…”)/$(eval “They bite and scratch each other’s eyes…”)/$(eval g=Math.floor(Math.random()*2);if(g==0){“$(user)”+" has won!“}else{”$(touser)“+” Has won!"})?i=5000&d=1))

1 Like

Hiya, something like that could work, however you’ll need to update the randomviewer part with New Random Viewer API since the other API is not working anymore.

beyond the broken api, that code will never let the random viewer win… if u pick somebody to duel both have a chance to win, but if u put no name to duel, whoever typed the command will always win, not the random viewer

the only way i can think to give the random viewer a chance to win is a previous command to alias to this one that does the chosen opponent/random viewer part and pass the names to this one that accepts them as $(1) and $(2) instead of $(user) and $(touser)

1 Like

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