2024-01-24 18:04:10 +01:00
# Tom, a twitch bot
2021-07-27 03:19:59 +02:00
2024-01-24 18:04:10 +01:00
[![status-badge ](https://ci.mylloon.fr/api/badges/72/status.svg )](https://ci.mylloon.fr/repos/72)
2021-07-29 00:56:22 +02:00
## Features
2024-01-24 18:04:10 +01:00
Here is the list of available commands by default:
2024-01-24 19:29:05 +01:00
> Some command have aliases, see `list` for more information
| Command | Explanation |
| -------- | ------------------------------------------------------------------- |
| `add` | Add command to the database (`add command_name command_message`) |
| `remove` | Remove command from database (`remove command_name`) |
| `list` | Print all available commands (internal and user-defined) |
| `edit` | Modify a database command (`edit command_name new_command_message`) |
2024-01-24 18:04:10 +01:00
## Setup with Docker
- Via [docker-compose ](./docker-compose.yml )
- Via command line
```bash
docker run -d \
--name="Bot-Tom" \
git.mylloon.fr/confreriedukassoulait/tom:latest \
--ACCESS_TOKEN="yourAccessToken" \
--PREFIX="yourPrefix" \
--CHANNEL="yourChannel(s)" \
2024-01-24 20:58:16 +01:00
-v /here/your/path/:/app/db
2024-01-24 18:04:10 +01:00
```
## Setup Locally
- Requires Python `3.11.6`
- Install dependencies
```bash
python3 -m pip install -r requirements.txt
```
- Rename `.envexample` file in `.env` , then open the file and complete the fields
2024-02-06 12:36:19 +01:00
| Field | Explanation |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `ACCESS_TOKEN` | [Access token of the bot account ](https://twitchtokengenerator.com/ ) (be sure you selected `Bot Chat` Token) |
| `PREFIX` | Prefix used for your bot |
| `CHANNEL` | Twitch channel(s) where the bot will run (separate by comma) |
| `RIOT_CHANNEL` \* | Replace `CHANNEL` by the channel name, example: `RIOT_PONCE` , value should be your Riot ID, prefixed by the region, example: `eu/User#123` |
> \* Available regions are: `EU`, `AP`, `NA`, `KR`
2024-01-24 18:04:10 +01:00
- Start bot
```bash
cd src; python3 main.py
```