Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a chat bot for demo server to respond to people's questions #1274

Closed
gabek opened this issue Jul 27, 2021 · 3 comments
Closed

Create a chat bot for demo server to respond to people's questions #1274

gabek opened this issue Jul 27, 2021 · 3 comments
Assignees
Labels
backlog Ideas that might be cool and can be looked into later. chat Issues dealing with the web chat client and server good first issue Good for newcomers hack A fun side-project that's not directly tied to the core service.

Comments

@gabek
Copy link
Member

gabek commented Jul 27, 2021

People often ask questions in the https://watch.owncast.online chat when there's nobody there to answer it. I think building a simple little chat bot could help.

  1. It would auto-reply to messages with something like "We're not here to answer your question, but please go to https://owncast.rocket.chat/ or visit us in our chat" to point people in the direction of getting answers.
  2. It would show off that you can build chat bots for Owncast with some markdown formatting and stuff.

API documentation: https://owncast.online/thirdparty/

@gabek gabek added good first issue Good for newcomers chat Issues dealing with the web chat client and server backlog Ideas that might be cool and can be looked into later. hack A fun side-project that's not directly tied to the core service. labels Jul 27, 2021
@unclearParadigm
Copy link
Contributor

Hey @gabek,

I'd like to give this bot a try. Should this go into examples/? Or shall it be a separate repository?
I'd write it in in Go, with a simple "net/http" server listening for incoming HTTP POSTS from Owncast webhooks. I haven't found docs that show how the actual body looks like (or at least how the eventData part looks like), I feel there should be. So I'll create docs as well. That'll cover #1016 (I don't have rocket.chat, but judging from the title that's what is meant, right?). I'd respond to the owncast-chat with either /api/integrations/chat/action or /api/integrations/chat/system (any preferences here?). I would also create a Dockerfile or Buildah bud file to containerize the app. Configuration (stuff like ListenPort, AccessToken for chat endpoints etc. ...) via a yaml configfile (and environment vars config layer override, if run in a container).

Is that somehow aligning with what you'd expect? Just wanted to make sure before I get started.

Cheers,
Ruffy

@gabek
Copy link
Member Author

gabek commented Aug 9, 2021

Hey Ruffy! Yeah, that sounds right! And yup, we're using Rocket.Chat as our project chat. Thanks for looking to cover #1016 as well, that will help people.

We should probably just create another repo with side projects like this so I just created https://github.com/owncast/owncast-examples.

/api/integrations/chat/system is probably best, as it'll show up looking like a real chat message.

Thanks for jumping on this, it'll be a nice little addition to the demo server!

GitHub
Some example projects that tie into Owncast APIs. Contribute to owncast/owncast-examples development by creating an account on GitHub.

@gabek
Copy link
Member Author

gabek commented Aug 15, 2021

Deployed!

@gabek gabek closed this as completed Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Ideas that might be cool and can be looked into later. chat Issues dealing with the web chat client and server good first issue Good for newcomers hack A fun side-project that's not directly tied to the core service.
Projects
None yet
Development

No branches or pull requests

2 participants