added translations + finnish 1

This commit is contained in:
WhatDidYouExpect 2025-03-16 16:39:26 +01:00
parent 59c7494675
commit 01ba29c944
12 changed files with 591 additions and 521 deletions

View file

@ -3,9 +3,6 @@ from dotenv import load_dotenv
import platform
import random
def print_multicolored(text):
print(text)
load_dotenv()
VERSION_URL = "https://goober.whatdidyouexpect.eu"
UPDATE_URL = VERSION_URL+"/latest_version.json"
@ -15,6 +12,8 @@ PREFIX = os.getenv("BOT_PREFIX")
hourlyspeak = int(os.getenv("hourlyspeak"))
PING_LINE = os.getenv("PING_LINE")
random_talk_channel_id1 = int(os.getenv("rnd_talk_channel1"))
LOCALE = os.getenv("locale")
gooberTOKEN = os.getenv("gooberTOKEN")
random_talk_channel_id2 = int(os.getenv("rnd_talk_channel2"))
cooldown_time = os.getenv("cooldown")
splashtext = os.getenv("splashtext")
@ -36,29 +35,4 @@ GREEN = "\033[32mSuccess: "
YELLOW = "\033[33mWarning: "
DEBUG = "\033[1;30mDebug: "
RESET = "\033[0m"
multicolorsplash = False
def apply_multicolor(text, chunk_size=3):
if multicolorsplash == False:
return
colors = [
"\033[38;5;196m", # Red
"\033[38;5;202m", # Orange
"\033[38;5;220m", # Yellow
"\033[38;5;46m", # Green
"\033[38;5;21m", # Blue
"\033[38;5;93m", # Indigo
"\033[38;5;201m", # Violet
]
chunks = [text[i:i+chunk_size] for i in range(0, len(text), chunk_size)]
colored_text = ""
for chunk in chunks:
color = random.choice(colors)
colored_text += f"{color}{chunk}\033[0m"
return colored_text
splashtext = apply_multicolor(splashtext)