So this is my first attempt at a custom command for Nightbot.
I’m working on a version 2, but I am no coder so it may be awhile.
Create a command called “!Horoscope”… or whatever…and put this in:
$(urlfetch http://myfunstuff.great-site.net/astro.php?query= )
To get a “reading”, your viewers type !Horoscope then their sign… like !Horoscope aries
There are a handful of responses, and the responses are sign specific… meaning a “reading” for Leo won’t show up for any other sign, for example.
Currently I have preloaded responses and a lot of times they will repeat…I don’t know how to fix that even though I use a randomize bit of code.
Some of these are really offensive or 18+ responses so if that’s not your thing, it’s best not to use it.
You need to send data to the API, it can’t read what comes after the command if you don’t tell it to send it through.
In our case here, I think
$(1) will be more than enough to do the job.
Please read the documentation.
I don’t know why that number is in there. Apparently it was automatically added by the forum.
It links to the site where the script is, but it’s not suppose to be in the command.
I don’t think you’ve read my answer, you need to send data to the API for it to work, here we use
I’m not a coder. I don’t know what that does.
You’re not a coder, but you know how to read, don’t you understand that I gave you the solution in my first reply? You just have to add the command and then call it with the horoscope sign you want:
!horoscope leo for example.
Read the documentation if you don’t understand, here, this time I link you to exactly what you need to read.
Wow. What an incredibly rude response.
I’ll move on now.
I’m sorry you find my reply rude, but you’re wasting my time: I give you the solution, you don’t even try it, and then you keep complaining it doesn’t work, don’t you see what’s wrong here?
Wasting your time? No one made you respond.
Show me where I keep complaining it doesn’t work.
I said I didn’t know what $(1)) does.
Who’s having reading issues now?
I gave you a link to the documentation in my first reply, it’s up to you to look for the information if you want to know what
$(1) does, the reason why I didn’t give you the direct link to the description of what it does is for you to read the entire documentation and learn how to bot works so you gain in autonomy to make your own commands, in my second reply I told you what it does because you didn’t take 5min to look it up yourself in the documentation.
You didn’t say it didn’t work, but you didn’t say it worked either, your questions made it feel like you didn’t even try the command, if you said thanks for the command and asked why we use
$(1), that would have been far better, instead you went on a number the forum adds to the link to count the number of times it was clicked, which was irrelevant because I completely ignored when I wrote the command, that’s why my second answer aims to answer why we use
$(1) in a few words, which is just me repeating my first answer really:
It can’t be clearer than that: we use
$(1) to send data to the API because it needs to be sent something to work.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.