Skip to content

Commit a124972

Browse files
feat: add unicode replacements for some custom emojis
1 parent c5f230f commit a124972

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

botstrap.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,23 @@
3131
GUILD_CATEGORY_TYPE = 4
3232
GUILD_FORUM_TYPE = 15
3333

34+
35+
EMOJIS: dict[str, str] = {
36+
"defcon_shutdown": "⛔",
37+
"defcon_unshutdown": "🛡️",
38+
"defcon_update": "⚙️",
39+
"failmail": "🧧",
40+
"failed_file": "📁",
41+
"incident_actioned": "✅",
42+
"incident_unactioned": "❌",
43+
"incident_investigating": "🔍",
44+
"status_dnd": "🔴",
45+
"status_idle": "🟡",
46+
"status_offline": "⚪",
47+
"status_online": "🟢",
48+
"trashcan": "🗑️",
49+
}
50+
3451
if not BOT_TOKEN:
3552
message = (
3653
"Couldn't find the `BOT_TOKEN` environment variable. "
@@ -318,7 +335,11 @@ def create_webhook(self, name: str, channel_id_: int) -> str:
318335
config_str += f"webhooks_{webhook_name}__id={webhook_id}\n"
319336

320337
config_str += "\n#Emojis\n"
321-
config_str += "emojis_trashcan=🗑️"
338+
339+
# we add some replacements for some of the emojis used by the bot
340+
# this is a best-effort and doesn't replace every emote
341+
for emoji_name, emoji_unicode in EMOJIS.items():
342+
config_str += f"emojis_{emoji_name}={emoji_unicode}\n"
322343

323344
with env_file_path.open("wb") as file:
324345
file.write(config_str.encode("utf-8"))

0 commit comments

Comments
 (0)