Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dazulu/beetsbot
A twitch chat bot based off tmi.js
https://github.com/dazulu/beetsbot
bot tmijs twitch twitch-bot
Last synced: 18 days ago
JSON representation
A twitch chat bot based off tmi.js
- Host: GitHub
- URL: https://github.com/dazulu/beetsbot
- Owner: dazulu
- Created: 2019-11-13T21:07:33.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T17:08:48.000Z (almost 2 years ago)
- Last Synced: 2024-12-17T22:37:56.305Z (18 days ago)
- Topics: bot, tmijs, twitch, twitch-bot
- Language: JavaScript
- Homepage:
- Size: 865 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BeetsBot
> A Twitch chat bot
## Features
- [Battle Royale](#battle-royale)
- [Throw/Catch](#throwcatch)
- [Random Number](#random-number)## Setup
We need to set a few environment variables for the bot to be able to auth and connect to a Twitch channel. These can be included in a _.env_ file, which will be imported.
`BOT_USERNAME`: Username of the bot's Twitch account
`OAUTH_TOKEN`: OAuth token for authentication
`CHANNEL_NAMES`: String delimited list of Twitch Channels to join
```bash
# Install dependencies
$ npm install# Serve with nodemon and babel-node for local development
$ npm run dev# Run webpack build for production
$ npm run build# Run production app
$ npm run start
```### Configuration
Configured in `src/config.json`
| Setting | Type | Description |
| --------------- | -------- | ---------------------------------------------- |
| `commandPrefix` | `string` | The prefix for chat commands e.g. ! or @ or \$ |---
## Throw/Catch
A set of commands to enable throwing and catching of a pre-defined item between chat members. There's no hidden depth here. It's just for fun.
![Throw/Catch example](screenshots/throw-catch.jpg 'Throw/Catch example')
```bash
# To throw an item to be caught
!throw# To catch the last item that was thrown
!catch# To throw an item at a chat member
!throw @username
```### Configuration
Throw/Catch can be configured in `src/config.json`
| Setting | Type | Description |
| ------- | -------- | ---------------------------- |
| `item` | `string` | Name of the item to be used. |---
## Battle Royale
An automated take on the popular Battle Royale genre. For a round, current members of chat are the active players. Players will randomly win 1v1 battles against other random players. There is a small chance a player can eliminate themselves. The last player alive is declared the winner.
![Battle Royale example](screenshots/battle-royale.jpg 'Battle Royale example')
```bash
# To start Battle Royale from Stream chat
!br
```- There must be 2 or more players and a game not already in progress.
- The command is **streamer-only**.### Configuration
Battle Royale can be configured in `src/config.json`
| Setting | Type | Description |
| ---------------- | -------- | ----------------------------------------- |
| `prefix` | `string` | Chat prefix for the bot messages in chat. |
| `minMessageWait` | `number` | Min time between actions in _ms_.\* |
| `maxMessageWait` | `number` | Max time between actions in _ms_. |_\*Keep `minMessageWait` upwards of 1000 or the bots messages will get throttled_
---
## Random Number
This feature asks the bot to pick a random number. By default it rolls between 1 and 100. If you include a number in the command, it will use that number as the max e.g. `!roll 500`.
![random roll example](screenshots/roll.jpg 'random roll example')
```bash
# To roll between 1 and 100
!roll# To roll between 1 and x e.g. !roll 500
!roll
```