From b20f1fd292583a1d378227627b37403e01c0a62a Mon Sep 17 00:00:00 2001 From: Slipstream Date: Tue, 10 Jun 2025 16:49:50 -0600 Subject: [PATCH] Load environment variables from .env file in sharded bot example --- examples/sharded_bot.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/sharded_bot.py b/examples/sharded_bot.py index fb20e54..be4a554 100644 --- a/examples/sharded_bot.py +++ b/examples/sharded_bot.py @@ -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: