Could someone please help me to create a NightBot Command using custom api?

Heyy,

I am a moderator for a steamer and am trying to get some commands for him to use on his stream. I have very little experience with custom APIs and NightBot commands and so was wondering if someone could help me create a command for the following:

I would like to create a command in which you have to guess the number. The viewers would type in something like !guess (number) [e.g. !guess 156] and that guess will be added to a database. A viewer will only have one guess but can override their previous guess by typing !guess followed by a new number. After all the viewers have guess the streamer (or a mod) would then type something like !correctguess (number) [e.g. !correctguess 69] and NightBot will say ’ whether anyone guessed it correctly and if not who got the closest.

If someone could do this for me I would be eternally grateful. Thank you,
N_th_nd

——————————————————————————————————————————————————————————————————

UPDATE:
I realise I didn’t really make myself clear for what I wanted. There should be two commands !guess (number) and !correctguess (number). When a viewer types !guess (number) NightBot should reply with ‘(user) has guessed (number) encounters.’ unless the user enters 1 where it should say ‘(user) has guessed 1 encounter.’ or the user enters a number that has already been entered where it should say ‘Sorry, (User who had already guessed that number) has already guessed (number) encounters. Please try again!’ or the user enters something other than a number (I.e. nothing or letters) where it should say ‘Please type !guess followed by the number of encounters you think it will take Gibbon.’ If a user guesses more than once the new guess should override there last guess. Also a user shoul only be able to guess once every 2 (or so) minutes, meaning one user can’t constantly spam the command and other users can still use the command even if someone has used the command seconds before. If someone does use it twice in the 2 minutes NightBot should say ‘(user), please wait 2 minutes between entering.’

When all the viewers have guessed the steamer (or a mod) will type (something like) !correct guess (number) and NightBot should reply with ‘Gibbon has successfully got the shiny after (number) encounters!’ and then ‘Congratulations to (correct user)! They correctly guessed (correct number) encounters!’ If someone gets it right or ‘Congratulations to (closest user)! They were the closest with (closest number) encounters!’ If there is a two way tie (I.e. Someone guesses 1 and someone guesses 3 and the correct guess is 2) then the user who had the highest guess out of the two wins. Also if possible correct it to make it grammatically correct for 1 encounter.

This is a very loaded request, so I do not believe you will find someone to help you build this all out for you (at least not for free most likely).

What you require could be built with our URLFetch variable and a remote API you (or someone else) creates, but it is not natively possible (as in without a remote API) to build something like this in Nightbot at this time.

I understand that this would be hard to do that’s why I only really wanted pointers on how I should go about doing this as I have no experience with custom APIs!

Advice on how to do this yourself? I’d honestly suggest looking for someone else to do it for you and getting them to explain it to you, there isn’t really a /simple/ way to do this.

Does anyone know someone I could contact to ask them about creating this custom API?

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