Bot for Twitch
Find a file
2021-07-29 00:56:41 +02:00
src Desc command discord 2021-07-29 00:56:41 +02:00
.gitignore Ajout commandes personnalisés 2021-07-29 00:48:42 +02:00
.gitlab-ci.yml Update info 2021-07-28 00:01:17 +02:00
docker-compose.yml new url 2021-07-28 22:46:55 +02:00
Dockerfile Docker build 2021-07-27 22:51:52 +02:00
README.md Better Readme 2021-07-29 00:56:22 +02:00
requirements.txt Ajout requirements 2021-07-27 02:28:12 +02:00

Simple Bot Twitch en Python utilisant la librairie TwitchIO.

Setup and Run

Locally

Requires Python 3.9.5.

Install necessary packages:

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 (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:

cd src
python3 main.py

With Docker

With a docker-compose or in command line:

docker run -d \
    --name="TwitchBot" \
    registry.gitlab.com/confreriedukassoulait/bot-tom:latest \
    --ACCESS_TOKEN="yourAccessToken" \
    --PREFIX="yourPrefix" \
    --CHANNEL="yourChannel(s)" \
    --DISCORD="yourDiscordLink"

Features

Here the list of available commands by default:

Command Explanation
discord Envoie le lien de ton serveur Discord
add Ajoute une commande de la base de donnée du bot : add omDeLaCommande messageDeLaCommande
remove Supprime une commande de la base de donnée du bot : remove nomDeLaCommande
list Affiche la liste des commandes de la base de donnée du bot
edit Modifie une commande de la base de donnée du bot : add nomDeLaCommande nouveauMessageDeLaCommande