Update main.py
This commit is contained in:
@@ -3,6 +3,8 @@ import sys
|
|||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
import dotenv
|
import dotenv
|
||||||
from discord.ext import commands
|
from discord.ext import commands
|
||||||
@@ -130,7 +132,7 @@ class App:
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
try:
|
try:
|
||||||
dotenv.load_dotenv()
|
dotenv.load_dotenv(Path.cwd() / ".env")
|
||||||
except Exception:
|
except Exception:
|
||||||
raise Exception('Failed to load .env file. Create it before running.')
|
raise Exception('Failed to load .env file. Create it before running.')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user