aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/constants.py3
-rw-r--r--botstrap.py6
2 files changed, 6 insertions, 3 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 3aacd0a16..006d0e4ce 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -11,14 +11,13 @@ will default to the values passed to the `default` kwarg.
"""
import os
from enum import Enum
-from typing import Optional
from pydantic import BaseModel, BaseSettings, root_validator
class EnvConfig(BaseSettings):
class Config:
- env_file = ".env", ".env.server",
+ env_file = ".env.server", ".env",
env_file_encoding = 'utf-8'
env_nested_delimiter = '__'
diff --git a/botstrap.py b/botstrap.py
index 28486bd36..90a954d9b 100644
--- a/botstrap.py
+++ b/botstrap.py
@@ -162,4 +162,8 @@ with DiscordClient() as discord_client:
config_str += f"webhooks_{webhook_name}__id={webhook_id}\n"
config_str += f"webhooks_{webhook_name}__channel={all_channels[webhook_name]}\n"
- env_file_path.write_text(config_str)
+ config_str += "\n#Emojis\n"
+ config_str += "emojis_trashcan=🗑️"
+
+ with env_file_path.open("wb") as file:
+ file.write(config_str.encode("utf-8"))