2021-07-27 01:52:22 +02:00
# Simple Bot Twitch en Python utilisant la librairie [TwitchIO](https://github.com/TwitchIO/TwitchIO).
2021-07-27 03:19:59 +02:00
## Setup and Run
Requires Python `3.9.5` .
Install necessary packages:
```bash
python3 -m pip install -r requirements.txt
```
2021-07-27 21:53:54 +02:00
Rename `.envexample` file in `.env` inside `src` folder, then open the file and complete the fields, there is an explanation below:
2021-07-27 03:19:59 +02:00
2021-07-27 21:56:02 +02:00
| Field | Explanation |
2021-07-27 03:19:59 +02:00
|----------------|-----------------------------------------------------------------------------------------------------------|
2021-07-27 21:56:02 +02:00
| `ACCESS_TOKEN` | Access token of the account you created for your bot that you can take [here ](https://twitchtokengenerator.com/ ) (be sure you selected Bot Chat Token) |
| `PREFIX` | Prefix you want to use for your bot |
| `CHANNEL` | The name of the your Twitch channel you want the bot to run at (separate by comma) |
| `DISCORD` | Link to your discord server |
2021-07-27 03:19:59 +02:00
Start Bot:
```bash
cd src
python3 main.py
```
2021-07-27 23:39:49 +02:00
## Use Docker
2021-07-28 22:46:55 +02:00
With a [docker-compose ](https://gitlab.com/ConfrerieDuKassoulait/Bot-Tom/-/blob/main/docker-compose.yml ) or in command line:
2021-07-27 23:39:49 +02:00
```
docker run -d \
--name="TwitchBot" \
2021-07-28 22:46:55 +02:00
registry.gitlab.com/confreriedukassoulait/bot-tom:latest \
2021-07-27 23:39:49 +02:00
--ACCESS_TOKEN="yourAccessToken" \
--PREFIX="yourPrefix" \
--CHANNEL="yourChannel(s)" \
--DISCORD="yourDiscordLink"
```