So, I am attempting to figure out an if then output for nightbot. The idea is based on a random choice and then I would like it to fetch info from a pastebin.
Ex: User:!tarot
Nighbot: [(User) you pulled The Tower] and it means xxx
this part works This is the part I am missing
First is a simple Eval which I have this chooses the random from the list
$(user), You drew $(eval responses=[The Fool!,The Magician!,The High Priestess!,The Empress!,The Emperor!,The Hierophant!,The Lovers!,The Chariot!,Justice!,Strength!,The Hermit!,Wheel of Fortune!,The Hanged Man!,Death!,Temperance!,The Devil!,The Tower!,The Star!,The Moon!,The Sun!,Judgement!,The World!];responses[Math.floor(Math.random()*responses.length)])
If output =The Fool then fetchurl line 47
but would i need this for each of the choices?
The next part is where I am stuck I am trying to code an if/then to display the meaning of said card. So I am trying to get it to evaluation the “list” of meanings. The file is too big to include in the command so I have a file ready to pastebin I just can’t figure out the second part of it. There are lots of random picks but I need it to display a specific meaning based on the output of the first command.
Ex: !Itarot
Nightbot [output], eval pastebin link, return proper meaning…
Any help is greatly appreciated.