Mylloon
aafde87ee2
All checks were successful
ci/woodpecker/manual/publish Pipeline was successful
* gitlab -> forgejo * python 3.9 -> 3.11 * readme overhal * format python file * basic PIP convention
47 lines
1.9 KiB
Markdown
47 lines
1.9 KiB
Markdown
# Tom, a twitch bot
|
|
|
|
[![status-badge](https://ci.mylloon.fr/api/badges/72/status.svg)](https://ci.mylloon.fr/repos/72)
|
|
|
|
## Features
|
|
|
|
Here is the list of available commands by default:
|
|
|
|
| Command | Alias | Explanation |
|
|
| -------- | ------------------------------- | ------------------------------------------------------------------- |
|
|
| `add` | | Add command to the database (`add command_name command_message`) |
|
|
| `remove` | `delete` | Remove command from database (`remove command_name`) |
|
|
| `list` | `commande`, `commandes`, `help` | Print all available commands (internal and user-defined) |
|
|
| `edit` | | Modify a database command (`edit command_name new_command_message`) |
|
|
|
|
## 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)" \
|
|
-v /here/your/path/:/opt/db
|
|
```
|
|
|
|
## 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
|
|
| 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) |
|
|
|
|
- Start bot
|
|
```bash
|
|
cd src; python3 main.py
|
|
```
|