I have a bird feeder that is controlled via the Internet. She has her own dedicated IP.
I want to teach a night bot to turn on the feeder if a viewer writes the command “on” in the chat.
I launched a Python webhook + flask on a remote server.
How can I make a bot command so that it sends a command and username to the webhook address? There I could handle her and send a command to the feeding trough. I’m just learning Python and it’s hard for me to figure out how to do this.
Hiya, thats cool!
You can use the UrlFetch variable: UrlFetch - Nightbot Docs
Nighbot will send a GET request to the provided url. You can either response with a plain text chat message directly, or return a space " " for no comfirmation message.
There is alot of info in the headers from the Nightbot request, about the user, the channel, and a link to send a Chat message. But you can also simply add and retrieve user information in the url, for example:
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.