Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fboucher/cloudbot
ComfyJS Twitch Bot for Frank's Stream twitch
https://github.com/fboucher/cloudbot
chatbot comfyjs javascript nodejs stream twitch
Last synced: 3 months ago
JSON representation
ComfyJS Twitch Bot for Frank's Stream twitch
- Host: GitHub
- URL: https://github.com/fboucher/cloudbot
- Owner: FBoucher
- License: mit
- Created: 2020-06-19T13:16:26.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-22T18:34:43.000Z (8 months ago)
- Last Synced: 2024-06-23T22:35:39.952Z (8 months ago)
- Topics: chatbot, comfyjs, javascript, nodejs, stream, twitch
- Language: JavaScript
- Homepage:
- Size: 12.1 MB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloud Bot
![Release Docker Image CI](https://github.com/FBoucher/CloudBot/workflows/Release%20Docker%20Image%20CI/badge.svg?branch=main) ![Build Beta Docker Images](https://github.com/FBoucher/CloudBot/workflows/Build%20Docker%20Images/badge.svg?branch=main)[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
Simple Twitch chatbot for Twitch Stream, build with [Comfy.JS](https://github.com/instafluff/ComfyJS).
![cloudbot logo](medias/cloudbot_logo.png)
First it was a pretext to learn (or refresh) my JavaScript knowledge, but it became quickly fun to add more and more feature to it. Have a look customize it. make suggestion... this is pure fun. :)
Currently Available Commands
----------------------------Games:
- **!stats**: Display current user statsSounds:
- **!bonjour**: play sound "Bonjour Hi" 3 different version at random
- **!bad**: play sound "Bonjour Hi"
- **!yeah**: play sound "Yeeeeeeaaaah!"
- **!knock** : Play sound "Realistic knock on a door"
- **!previously** : Play sound "Previously on Frank's channel" said by Jeff FritzCB:
- **!cloud** : Show CD (aka Cloud Bot) GIFTools:
- **!time** : Add a time log to the show notes (those are used to create timestamps on YouTube)
- **!attention** : Play a notification sound and draw the text in the screen.
- **!note** : Add a note/ code snippet / url useful during the stream
- **!cmd**, **!command**, **!commands**: Display in the chat the URL back to this list.
- **!referal**, **!referals**: Display in the chat the URL(s) of Frank's referal(s).
- **!livecoder**, **!livecoders**: Provide more info about Live Codersin the chat.Only Broadcaster:
- **!scores**: display table of highest scores
- **!clean**: hide/ clean all previous text in the screen
- **!load**: Load the file containing the previous session data.
- **!save**: Save in a local file `streamSession.json` the current session data.
- **!talk**: The bot will repete the message
- **!so** : shout-out! to user.- **!todo-add** : Add a new To-Do
- **!todo-start** : Set the identified To-Do as active
- **!todo-cancel** : Set the identified To-Do as cancelled
- **!todo-done** : Set the identified To-Do as done/ closed- **!reminder-add** | reminder description: Create a new reminder.
- **!reminder-stop** : Set the reminder with the name equal to to DONE.
- **!reminder-pause** : Pause the reminder with the name equal to . Set its status to inactive.Upcomming Available Commands
----------------------------- lift
- etc.How to use it
-------------### Directly from the code
The Cloudbot now required a server. A tiny one but it's not a static HTML web page anymore. It's using Node.js. You can run it locally or host it somewhere (ex: Azure).
If you decide to run it locally execute: `npm start` from inside the folder `src`.Make a new browser source overlay into your streaming tools (ex: OBS, StreamLabs OBS) and connect it to the root url where the server is running. (ex: `http://localhost:3000`.
Create a file `secret.js` with the following code in it:
```js
const authToken = "oauth:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
```Replace the token by the value found on: https://twitchapps.com/tmi/
Finally replace fboucheros by the name of your Twitch Channel on the last line.
```js
ComfyJS.Init( "fboucheros", authToken );
```### Using Docker Container
This project is now available in a container. You can find it on: [https://hub.docker.com/repository/docker/fboucher/cloudbot](https://hub.docker.com/repository/docker/fboucher/cloudbot)
- The container by default uses the port 3000, you can map it to a different one if you want to keep 3000 available for some other node development (in the command below, the chat bot will be available at http://localhost:3001).
- The `${PWD}` is the current local folder on the host. This folder MUST CONTAINED:
- a file `secret.js` with a auth key in it.```javascript
const authToken = "oauth:____________________";
```- a file `streamSession.json` To initialize the sessions.
```json
{
"Project": "",
"Id": 42,
"DateTimeStart": "",
"DateTimeEnd": "",
"Notes": [],
"UserSession": [],
"NewFollowers": [],
"Raiders": [],
"Subscribers": [],
"Hosts": [],
"Cheerers": [],
"TimeLogs": [],
"Todos": [],
"Reminders": []
}
```Here an example how to instantiate the chatbot.
```bash
docker run -p 3001:3000 -d -v ${PWD}:/usr/src/app/io --name ceebee fboucher/cloudbot:latest
```Then on stream in the chat type !start [projectName]
~ **Have fun!**
---
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!