moving env file to root folder and removing discord command
This commit is contained in:
parent
f84cbc5838
commit
6a9cb8d03a
3 changed files with 2 additions and 20 deletions
|
@ -1,4 +1,3 @@
|
||||||
ACCESS_TOKEN=
|
ACCESS_TOKEN=
|
||||||
PREFIX=
|
PREFIX=
|
||||||
CHANNEL=
|
CHANNEL=
|
||||||
DISCORD=
|
|
|
@ -12,14 +12,13 @@ Install necessary packages:
|
||||||
python3 -m pip install -r requirements.txt
|
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 |
|
| 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) |
|
| `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 |
|
| `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) |
|
| `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:
|
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:
|
With a [docker-compose](https://gitlab.com/ConfrerieDuKassoulait/Bot-Tom/-/blob/main/docker-compose.yml) or in command line:
|
||||||
|
|
||||||
```
|
```bash
|
||||||
docker run -d \
|
docker run -d \
|
||||||
--name="TwitchBot" \
|
--name="TwitchBot" \
|
||||||
registry.gitlab.com/confreriedukassoulait/bot-tom:latest \
|
registry.gitlab.com/confreriedukassoulait/bot-tom:latest \
|
||||||
|
@ -50,7 +49,6 @@ Here the list of available commands by default:
|
||||||
|
|
||||||
| Command | Explanation |
|
| 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` |
|
| `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` |
|
| `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) |
|
| `list` | Affiche la liste des commandes (base de donnée + intégré au bot) |
|
||||||
|
|
|
@ -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']} !")
|
|
Loading…
Reference in a new issue