Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion voicecreate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
from discord.ext import commands
import traceback
import sys
import json


__config = dict()

try:
with open("config.json", 'r', encoding="utf-8") as _f:
__config = json.loads(_f.read())
assert __config["token"]
except Exception as e:
print("error reading config\n", e)
exit(1)


intents = discord.Intents.default()
#Message content intent needs to be enabled in the developer portal for your chosen bot.
Expand Down Expand Up @@ -30,4 +43,4 @@ async def on_ready():
print(f'Failed to load extension {extension}.', file=sys.stderr)
traceback.print_exc()

bot.run(DISCORD_TOKEN)
bot.run(__config["token"])