So this command `
$(eval a=
$(urlfetch json https://pastebin.com/raw/---)
.split(#
);a[Math.floor(Math.random()*a.length)])
`
It pulls a random line from the note , I want him to pull a line that I selected from the chat if that’s possible .
So this command `
$(eval a=
$(urlfetch json https://pastebin.com/raw/---)
.split(#
);a[Math.floor(Math.random()*a.length)])
`
It pulls a random line from the note , I want him to pull a line that I selected from the chat if that’s possible .
Hiya, can you clarify what you want, not sure I understand.
Maybe add some examples as well.
If it’s in pastebin 3 jokes like this
joke1#joke2#joke3#
It’s going to work like this with a chat
me : !joke
Nightbot : joke2
me : !joke
Nightbot : joke3
And he’s going to do it randomly , I want him to do it in a way that I choose joke like this
me : !joke 1
Nightbot : joke1
me : !joke 2
Nightbot : joke2
Hey @iYouSef!
You’re not too far off, see Memes or Jokes Command - #2 by Emily
Basically you’re missing important backticks in your code:
$(eval a=`$(urlfetch json https://pastebin.com/raw/XXXXXXXX)`.split(`#`);a[Math.floor(Math.random()*a.length)])
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.