Using YouTube and/or Nightbot API to retrieve messages

Hi all,

To help out a YouTube streamer I follow, I’m trying to create a bot to help him interact with his audience in chat. He’s already using Nightbot, so I thought this would be a good place to start. I’m no stranger to programming and JSON REST APIs, but I am a stranger to writing chat-bots for YouTube live streams, so I could use some pointers on where to get started.

The features I want to implement are described in detail in a YouTube comment. But in short, I want to provide the presenter with a filtered view of the chat-messages. If a chatter wants to address the presenter directly, they need to use a special tag / command.

But from what I gather from the Nightbot API docs, there is no way for an external app to retrieve messages or data on used commands. It seems that I can only set up rules on how the bot replies to certain commands. Am I looking in the wrong place? Should I be using a more native API? If I do, can I still integrate with Nightbot? I’ve seen mention of ‘custom APIs’, but I haven’t been able to find any details on that.


This is correct. This is because generally reading the data from whatever chat requires no account or chat handling, but actually putting messages in chat requires that stuff, so the nightbot api allows outside apps to do so. Reading chat should be done natively, and you should look into the youtube api for doing so. Sadly i don’t know anything about that specifically, so i can’t point towards any such docs with assurance, only that i found this from the youtube docs.

If you aren’t actually putting messages into chat at all then it seems like you aren’t needing to interact with nightbot, rather doing something client specific with youtube messages. Customapi’s are a different feature that allows nightbot to put message responses from websites into a variable of a command message.

Thanks! That seems like a very useful link.

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