From 038fde940172b6902805d4ab0c8b9ecad5098da6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 6 Dec 2017 16:36:31 +0100 Subject: [PATCH] Ajout de la configuration (je te laisse ajouter dans le gitignore) --- bot.py | 6 +++++- config.json | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 config.json diff --git a/bot.py b/bot.py index 63422ad..bcb9bf1 100644 --- a/bot.py +++ b/bot.py @@ -1,7 +1,11 @@ +import json import discord from discord.ext import commands -bot = commands.Bot(description="Je suis le bot du serveur FTW !", command_prefix="<@384094872820252674> ") +with open('config.json') as json_data_file: + parameter = json.load(json_data_file) + +bot = commands.Bot(command_prefix=parameter['Bot']['prefix'], description=parameter['Bot']['description']) owner = ["177393521051959306"] diff --git a/config.json b/config.json new file mode 100644 index 0000000..d2cae4b --- /dev/null +++ b/config.json @@ -0,0 +1,8 @@ +{ + "Bot" : { + "name": "FTW - Bot", + "description": "Je suis le bot du serveur FTW !", + "prefix": "<@384094872820252674> ", + "token": "-" + } +} \ No newline at end of file