From 7668ddeb717f23c1e9df6e62e469d5ddce2c9ce6 Mon Sep 17 00:00:00 2001 From: elliotnichols Date: Sat, 25 Sep 2021 10:56:23 +0100 Subject: [PATCH] Add .env support --- bot.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 087ef86..a962fc5 100644 --- a/bot.py +++ b/bot.py @@ -8,11 +8,17 @@ from discord.ext.commands import has_permissions, MissingPermissions import aiohttp import mimetypes import requests +from decouple import config bot = commands.Bot(command_prefix=".", intents=discord.Intents.default(), case_insensitive=True) -token = "insert bot token here!" +# To add your token create a .env file in the top directory and add the following contents: +# ```` +# BOT_TOKEN={Paste your token here} +# ```` +# Remember to remove the comment ^^ +token = config("BOT_TOKEN") logging.basicConfig(filename='console.log', level=logging.INFO,