Load environment variables from .env file in sharded bot example

This commit is contained in:
Slipstream 2025-06-10 16:49:50 -06:00
parent 6d5b92ad69
commit b20f1fd292
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -9,6 +9,9 @@ if os.path.join(os.getcwd(), "examples") == os.path.dirname(os.path.abspath(__fi
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
import disagreement
from dotenv import load_dotenv
load_dotenv()
TOKEN = os.environ.get("DISCORD_BOT_TOKEN")
if not TOKEN: