From 6a9cb8d03ac7cbf9be9441a8b7f831cca658c30d Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 2 Aug 2021 13:37:19 +0200 Subject: [PATCH] moving env file to root folder and removing discord command --- src/.envexample => .envexample | 1 - README.md | 6 ++---- src/modules/utils.py | 15 --------------- 3 files changed, 2 insertions(+), 20 deletions(-) rename src/.envexample => .envexample (77%) delete mode 100644 src/modules/utils.py diff --git a/src/.envexample b/.envexample similarity index 77% rename from src/.envexample rename to .envexample index 397c9c2..19e9e19 100644 --- a/src/.envexample +++ b/.envexample @@ -1,4 +1,3 @@ ACCESS_TOKEN= PREFIX= CHANNEL= -DISCORD= diff --git a/README.md b/README.md index 85645a4..d82de0b 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,13 @@ 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: +Rename `.envexample` file in `.env` in root 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: @@ -32,7 +31,7 @@ python3 main.py With a [docker-compose](https://gitlab.com/ConfrerieDuKassoulait/Bot-Tom/-/blob/main/docker-compose.yml) or in command line: -``` +```bash docker run -d \ --name="TwitchBot" \ registry.gitlab.com/confreriedukassoulait/bot-tom:latest \ @@ -50,7 +49,6 @@ 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 (base de donnée + intégré au bot) | diff --git a/src/modules/utils.py b/src/modules/utils.py deleted file mode 100644 index 210e3da..0000000 --- a/src/modules/utils.py +++ /dev/null @@ -1,15 +0,0 @@ -from twitchio.ext import commands -from utils.core import load - -def prepare(client: commands.Bot): - client.add_cog(Utils(client)) - -class Utils(commands.Cog): - def __init__(self, client: commands.Bot): - self.client = client - self.keys = load(["DISCORD"]) - - @commands.command(name="discord") - async def _discord(self, ctx: commands.Context): - """Envoie le lien de ton serveur Discord""" - await ctx.send(f"@{ctx.author.name}, Rejoins mon Discord {self.keys['DISCORD']} !")