Using custom APIs to make commands inside commands?

Hey, new here, new to programming. Is there a way to make a custom API to make nightbot do a command. For instance, make nightbot do a !poll new command on its own.

To be specific, the command i would like to automatically implement is !poll new What game should Ray play? | TeeKO | Trivial Murder Party | Quiplash 2 | Guesspionage and have it activated by entering !PP3.

Yes you could. By passing after the command with $(query) or $(querystring) and returning a value based on what was sent. However you would need to have some server side process like counting and processing votes etc.

Or you could just use the Nightbot !poll command.

No, i want it to happen automatically without me tying it out. just the simple command !pp3 will make the entire poll happen.

You don’t need a customapi for this. This can be done with the alias portion of a command. Here is what you need for what you want, just copy paste:

!commands add !pp3 -ul=mod -a=!poll new What game should Ray play? | TeeKO | Trivial Murder Party | Quiplash 2 | Quesspionage

-ul=mod makes it so that only moderators can run it
-a=!poll means the command will run !poll with what comes after. In this case the creation of the specific poll.

Thank you so much I’ve been searching for 3 hours you’re the best.

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