From bd598c3ea1c39eac0fcc3dcf3de3ec6a2cd8fcca Mon Sep 17 00:00:00 2001 From: Choco <94597336+ChocoMeow@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:57:46 +0800 Subject: [PATCH] Added others source settings --- function.py | 2 +- settings Example.json | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/function.py b/function.py index f9a1d0b..da6a72f 100644 --- a/function.py +++ b/function.py @@ -108,7 +108,7 @@ def format_time(number:str) -> int: return (int(num.tm_hour) * 3600 + int(num.tm_min) * 60 + int(num.tm_sec)) * 1000 def get_source(source: str, type: str) -> str: - source_settings: dict = settings.sources_settings.get(source.lower(), {}) + source_settings: dict = settings.sources_settings.get(source.lower(), settings.sources_settings.get("others")) return source_settings.get(type, ("🔗" if type == "emoji" else settings.embed_color)) def cooldown_check(ctx: commands.Context) -> Optional[commands.Cooldown]: diff --git a/settings Example.json b/settings Example.json index bf586ce..5a26452 100644 --- a/settings Example.json +++ b/settings Example.json @@ -82,6 +82,10 @@ "tiktok": { "emoji": "<:tiktok:996007689798811698>", "color": "0x74ECE9" + }, + "others": { + "emoji": "🌎", + "color": "0xb3b3b3" } }, "default_controller": {