Browse Source

Add .env support

pull/1/head
elliotnichols 3 years ago
parent
commit
7668ddeb71
  1. 8
      bot.py

8
bot.py

@ -8,11 +8,17 @@ from discord.ext.commands import has_permissions, MissingPermissions
import aiohttp import aiohttp
import mimetypes import mimetypes
import requests import requests
from decouple import config
bot = commands.Bot(command_prefix=".", intents=discord.Intents.default(), bot = commands.Bot(command_prefix=".", intents=discord.Intents.default(),
case_insensitive=True) 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', logging.basicConfig(filename='console.log',
level=logging.INFO, level=logging.INFO,

Loading…
Cancel
Save