Changed bot token to config file format rather than .py file format

This commit is contained in:
Sean Wang
2019-03-21 18:11:53 -04:00
parent 93a19267d6
commit c13ca57ec3
2 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
# Seans Stuff
/.idea
BotToken.py
BotToken.config
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

View File

@@ -1,10 +1,12 @@
from discord.ext.commands import Bot
from discord import Game
import random
from BotToken import BotToken
from pathlib import Path
BOT_PREFIX = "+"
TOKEN = BotToken().token
token_config = open(Path("BotToken.config"))
TOKEN = token_config.readline().split()[0]
client = Bot(command_prefix=BOT_PREFIX)