41 lines
1.3 KiB
Markdown
41 lines
1.3 KiB
Markdown
# Simple Bot Twitch en Python utilisant la librairie [TwitchIO](https://github.com/TwitchIO/TwitchIO).
|
|
|
|
## Setup and Run
|
|
|
|
Requires Python `3.9.5`.
|
|
|
|
Install necessary packages:
|
|
|
|
```bash
|
|
python3 -m pip install -r requirements.txt
|
|
```
|
|
|
|
Rename `.envexample` file in `.env` inside `src` folder, then open the file and complete the fields, there is an explanation below:
|
|
|
|
| Field | Explanation |
|
|
|----------------|-----------------------------------------------------------------------------------------------------------|
|
|
| `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 |
|
|
|
|
Start Bot:
|
|
|
|
```bash
|
|
cd src
|
|
python3 main.py
|
|
```
|
|
|
|
## Use Docker
|
|
|
|
With a [docker-compose](https://gitlab.com/ConfrerieDuKassoulait/TwitchBot/-/blob/main/docker-compose.yml) or in command line:
|
|
|
|
```
|
|
docker run -d \
|
|
--name="TwitchBot" \
|
|
registry.gitlab.com/confreriedukassoulait/twitchbot:latest \
|
|
--ACCESS_TOKEN="yourAccessToken" \
|
|
--PREFIX="yourPrefix" \
|
|
--CHANNEL="yourChannel(s)" \
|
|
--DISCORD="yourDiscordLink"
|
|
```
|