Skip to content

Commit 6faf4c3

Browse files
committed
Added utf 8 encoding to config
1 parent 6284744 commit 6faf4c3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ def guild_id(self) -> typing.Optional[int]:
294294
except ValueError:
295295
self.config.remove("guild_id")
296296
logger.critical("Invalid GUILD_ID set.")
297+
else:
298+
logger.debug("No GUILD_ID set.")
297299
return None
298300

299301
@property
@@ -456,7 +458,7 @@ async def on_ready(self):
456458
await self.wait_for_connected()
457459

458460
if self.guild is None:
459-
logger.debug("Logging out due to invalid GUILD_ID.")
461+
logger.error("Logging out due to invalid GUILD_ID.")
460462
return await self.logout()
461463

462464
logger.line()

core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def populate_cache(self) -> dict:
139139
)
140140
if os.path.exists(config_json):
141141
logger.debug("Loading envs from config.json.")
142-
with open(config_json, "r") as f:
142+
with open(config_json, "r", encoding="utf-8") as f:
143143
# Config json should override env vars
144144
try:
145145
data.update(

0 commit comments

Comments
 (0)