+
+ RAM:
+ {stats['ram_usage']}
+
+
+ CPU:
+ {stats['system_cpu']}
+
+
+ Latency:
+ {stats['latency']}
+
+
+ JSON Size:
+ {stats['memory_json_size']}
+
+
+ Uptime:
+ {stats['bot_uptime']}
+
+
+
+
+
+
Last Command
+
{stats['last_command']}
+
at {stats['last_command_time']}
+
+
Logged into goober central
+
{stats['authenticated']}
+
+
Last generated message
+
{stats['lastmsg']}
+
+
Version
+
Installed Version: {stats['localversion']}
+
Latest Version: {stats['latestversion']}
+
+
goober-central URL
+
{VERSION_URL}
+
+
Change song
+
+
+
+
+
Servers ({stats['guild_count']})
+
+ {guild_list_html}
+
+
+
Blacklisted Users ({stats['bl_count']})
+
+ {blacklisted_users_html if stats['blacklisted_users'] else "
No blacklisted users
"}
+
+
+
+
+
+
+ """
+
+ return web.Response(text=html_content, content_type="text/html")
+
+ async def handle_stats(self, request):
+ return await self.handle_index(request)
+
+ async def handle_json_data(self, request):
+ stats = await self.get_bot_stats()
+ return web.json_response(stats)
+
+
+async def setup(bot):
+ await bot.add_cog(GooberWeb(bot))
diff --git a/assets/cogs/whoami.py b/assets/cogs/whoami.py
new file mode 100644
index 0000000..55379ec
--- /dev/null
+++ b/assets/cogs/whoami.py
@@ -0,0 +1,26 @@
+import discord
+from discord.ext import commands
+
+
+class whoami(commands.Cog):
+ def __init__(self, bot):
+ self.bot = bot
+
+ @commands.command()
+ async def whoami(self, ctx):
+ user_id = ctx.author.id
+ username = ctx.author.name
+
+ embed = discord.Embed(
+ title="User Information",
+ description=f"Your User ID is: {user_id}\n"
+ f"Your username is: {username}\n"
+ f"Your nickname in this server is: <@{user_id}>",
+ color=discord.Color.blue(),
+ )
+
+ await ctx.send(embed=embed)
+
+
+async def setup(bot):
+ await bot.add_cog(whoami(bot))
diff --git a/assets/fonts/Impact.ttf b/assets/fonts/Impact.ttf
new file mode 100644
index 0000000..7b7956f
Binary files /dev/null and b/assets/fonts/Impact.ttf differ
diff --git a/assets/fonts/SpecialGothic.ttf b/assets/fonts/SpecialGothic.ttf
new file mode 100644
index 0000000..1da7c19
Binary files /dev/null and b/assets/fonts/SpecialGothic.ttf differ
diff --git a/assets/fonts/TNR.ttf b/assets/fonts/TNR.ttf
new file mode 100644
index 0000000..51261a0
Binary files /dev/null and b/assets/fonts/TNR.ttf differ
diff --git a/assets/images/attention.webp b/assets/images/attention.webp
new file mode 100644
index 0000000..f680665
Binary files /dev/null and b/assets/images/attention.webp differ
diff --git a/assets/images/bibinos.png b/assets/images/bibinos.png
new file mode 100644
index 0000000..5a7b846
Binary files /dev/null and b/assets/images/bibinos.png differ
diff --git a/assets/images/breaking_news.png b/assets/images/breaking_news.png
new file mode 100644
index 0000000..039f6f0
Binary files /dev/null and b/assets/images/breaking_news.png differ
diff --git a/assets/images/cache/breaking_news.png b/assets/images/cache/breaking_news.png
new file mode 100644
index 0000000..326b20d
Binary files /dev/null and b/assets/images/cache/breaking_news.png differ
diff --git a/assets/images/crash.webp b/assets/images/crash.webp
new file mode 100644
index 0000000..60d918b
Binary files /dev/null and b/assets/images/crash.webp differ
diff --git a/assets/images/crash2.png b/assets/images/crash2.png
new file mode 100644
index 0000000..12f7616
Binary files /dev/null and b/assets/images/crash2.png differ
diff --git a/assets/images/genuineidiot.png b/assets/images/genuineidiot.png
new file mode 100644
index 0000000..226ca47
Binary files /dev/null and b/assets/images/genuineidiot.png differ
diff --git a/assets/images/smashedphone.webp b/assets/images/smashedphone.webp
new file mode 100644
index 0000000..845070f
Binary files /dev/null and b/assets/images/smashedphone.webp differ
diff --git a/assets/images/thisisfine.png b/assets/images/thisisfine.png
new file mode 100644
index 0000000..41977dc
Binary files /dev/null and b/assets/images/thisisfine.png differ
diff --git a/assets/locales/README.md b/assets/locales/README.md
new file mode 100644
index 0000000..5fd0e77
--- /dev/null
+++ b/assets/locales/README.md
@@ -0,0 +1,8 @@
+# Locales Directory
+
+This folder contains localization files for the project.
+
+**Notice:**
+The Spanish and French locales currently do not have maintainers. If you are interested in helping maintain or improve these translations, please consider contributing!
+
+Thank you for supporting localization efforts!
\ No newline at end of file
diff --git a/assets/locales/empty.json b/assets/locales/empty.json
new file mode 100644
index 0000000..544b7b4
--- /dev/null
+++ b/assets/locales/empty.json
@@ -0,0 +1,3 @@
+{
+
+}
\ No newline at end of file
diff --git a/assets/locales/en.json b/assets/locales/en.json
new file mode 100644
index 0000000..71e19eb
--- /dev/null
+++ b/assets/locales/en.json
@@ -0,0 +1,144 @@
+{
+ "memory_file_valid": "The memory.json file is valid!",
+ "file_aint_uft8": "File is not valid UTF-8 text. Might be binary or corrupted.",
+ "psutil_not_installed": "Memory check skipped.",
+ "not_cloned": "Goober is not cloned! Please clone it from GitHub.",
+ "checks_disabled": "Checks are disabled!",
+ "unhandled_exception": "An unhandled exception occurred. Please report this issue on GitHub.",
+ "active_users:": "Active users:",
+ "spacy_initialized": "spaCy and spacytextblob are ready.",
+ "spacy_model_not_found": "The spaCy model was not found! Downloading it....`",
+ "env_file_not_found": "The .env file was not found! Please create one with the required variables.",
+ "error_fetching_active_users": "Error fetching active users: {error}",
+ "error_sending_alive_ping": "Error sending alive ping: {error}",
+ "already_started": "I've already started! I'm not updating...",
+ "please_restart": "Please Restart goober!",
+ "local_ahead": "Local {remote}/{branch} is ahead and/or up to par. Not Updating...",
+ "remote_ahead": "Remote {remote}/{branch} is ahead. Updating...",
+ "cant_find_local_version": "I can't find the local_version variable! Or it's been tampered with and it's not an integer!",
+ "running_prestart_checks": "Running pre-start checks...",
+ "continuing_in_seconds": "Continuing in {seconds} seconds... Press any key to skip.",
+ "missing_requests_psutil": "Missing requests and psutil! Please install them using pip: `pip install requests psutil`",
+ "requirements_not_found": "requirements.txt not found at {path} was it tampered with?",
+ "warning_failed_parse_imports": "Warning: Failed to parse imports from {filename}: {error}",
+ "cogs_dir_not_found": "Cogs directory not found at {path}, skipping scan.",
+ "std_lib_local_skipped": "STD LIB / LOCAL {package} (skipped check)",
+ "ok_installed": "OK",
+ "missing_package": "MISSING",
+ "missing_package2": "is not installed",
+ "missing_packages_detected": "Missing packages detected:",
+ "telling_goober_central": "Telling goober central at {url}",
+ "failed_to_contact": "Failed to contact {url}: {error}",
+ "all_requirements_satisfied": "All requirements are satisfied.",
+ "ping_to": "Ping to {host}: {latency} ms",
+ "high_latency": "High latency detected! You may experience delays in response times.",
+ "could_not_parse_latency": "Could not parse latency.",
+ "ping_failed": "Ping to {host} failed.",
+ "error_running_ping": "Error running ping: {error}",
+ "memory_usage": "Memory Usage: {used} GB / {total} GB ({percent}%)",
+ "memory_above_90": "Memory usage is above 90% ({percent}%). Consider freeing up memory.",
+ "total_memory": "Total Memory: {total} GB",
+ "used_memory": "Used Memory: {used} GB",
+ "low_free_memory": "Low free memory detected! Only {free} GB available.",
+ "measuring_cpu": "Measuring CPU usage per core...",
+ "core_usage": "Core {idx}: [{bar}] {usage}%",
+ "total_cpu_usage": "Total CPU Usage: {usage}%",
+ "high_avg_cpu": "High average CPU usage: {usage}%",
+ "really_high_cpu": "Really high CPU load! System may throttle or hang.",
+ "memory_file": "Memory file: {size} MB",
+ "memory_file_large": "Memory file is 1GB or higher, consider clearing it to free up space.",
+ "memory_file_corrupted": "Memory file is corrupted! JSON decode error: {error}",
+ "consider_backup_memory": "Consider backing up and recreating the memory file.",
+ "memory_file_encoding": "Memory file has encoding issues: {error}",
+ "error_reading_memory": "Error reading memory file: {error}",
+ "memory_file_not_found": "Memory file not found.",
+ "modification_warning": "Goober has been modified! Any changes will be lost in an update!",
+ "reported_version": "Reported Version:",
+ "current_hash": "Current Hash:",
+ "not_found": "is not found!",
+ "version_error": "Unable to fetch version info. Status code",
+ "loaded_cog": "Loaded cog:",
+ "loaded_cog2": "Loaded module:",
+ "cog_fail": "Failed to load cog:",
+ "cog_fail2": "Failed to load module:",
+ "no_model": "No saved Markov model found. Starting from scratch.",
+ "folder_created": "Folder '{folder_name}' created.",
+ "folder_exists": "Folder '{folder_name}' already exists. skipping...",
+ "logged_in": "Logged in as",
+ "synced_commands": "Synced",
+ "synced_commands2": "commands!",
+ "fail_commands_sync": "Failed to sync commands:",
+ "started": "{name} has started!\nYou're the star of the show now baby!",
+ "name_check": "Error checking name availability:",
+ "name_taken": "Name is already taken. Please choose a different name.",
+ "name_check2": "Error during name availability check:",
+ "add_token": "Token: {token}\nPlease add this token to your .env file as",
+ "token_exists": "Token already exists in .env. Continuing with the existing token.",
+ "registration_error": "Error during registration:",
+ "version_backup": "Backup created:",
+ "backup_error": "Error: {LOCAL_VERSION_FILE} not found for backup.",
+ "model_loaded": "Markov model loaded from",
+ "fetch_update_fail": "Could not fetch update information.",
+ "invalid_server": "Error: Invalid version information received from server.",
+ "goober_server_alert": "Alert from goober central!\n",
+ "new_version": "New version available: {latest_version} (Current: {local_version})",
+ "changelog": "Check {VERSION_URL}/goob/changes.txt to check out the changelog\n\n",
+ "invalid_version": "The version: {local_version} isnt valid!",
+ "invalid_version2": "If this is intended then ignore this message, else press Y to pull a valid version from the server regardless of the version of goober currently running",
+ "invalid_version3": "The current version will be backed up to current_version.bak..",
+ "input": "(Y or any other key to ignore....)",
+ "modification_ignored": "You've modified",
+ "modification_ignored2": "IGNOREWARNING is set to false..",
+ "latest_version": "You're using the latest version:",
+ "latest_version2": "Check {VERSION_URL}/goob/changes.txt to check out the changelog",
+ "pinging_disabled": "Pinging is disabled! Not telling the server im on...",
+ "goober_ping_success": "Logged into goober central as {NAME}",
+ "goober_ping_fail": "Failed to send data. Server returned status code:",
+ "goober_ping_fail2": "An error occurred while sending data:",
+ "sentence_positivity": "Positivity of sentence is:",
+ "command_edit_fail": "Failed to edit message:",
+ "command_desc_retrain": "Retrains the Markov model manually.",
+ "command_markov_retrain": "Retraining the Markov model... Please wait.",
+ "command_markov_memory_not_found": "Error: memory file not found!",
+ "command_markov_memory_is_corrupt": "Error: memory file is corrupt!",
+ "command_markov_retraining": "Processing {data_size} data points...",
+ "command_markov_retrain_successful": "Markov model retrained successfully using {data_size} data points!",
+ "command_desc_talk":"talks n like stuf",
+ "command_talk_insufficent_text": "I need to learn more from messages before I can talk.",
+ "command_talk_generation_fail": "I have nothing to say right now!",
+ "command_desc_help": "help",
+ "command_help_embed_title": "Bot Help",
+ "command_help_embed_desc": "List of commands grouped by category.",
+ "command_help_categories_general": "General",
+ "command_help_categories_admin": "Administration",
+ "command_help_categories_custom": "Custom Commands",
+ "command_ran": "Info: {message.author.name} ran {message.content}",
+ "command_ran_s": "Info: {interaction.user} ran ",
+ "command_desc_ping": "ping",
+ "command_desc_setlang": "Set a new language for the bot (temporarily)",
+ "command_ping_embed_desc": "Bot Latency:",
+ "command_ping_footer": "Requested by",
+ "command_about_desc": "about",
+ "command_about_embed_title": "About me",
+ "command_about_embed_field1": "Name",
+ "command_about_embed_field2name": "Version",
+ "command_about_embed_field2value": "Local: {local_version} \nLatest: {latest_version}",
+ "command_desc_stats": "stats",
+ "command_stats_embed_title": "Bot stats",
+ "command_stats_embed_desc": "Data about the the bot's memory.",
+ "command_stats_embed_field1name": "File Stats",
+ "command_stats_embed_field1value": "Size: {file_size} bytes\nLines: {line_count}",
+ "command_stats_embed_field2name": "Version",
+ "command_stats_embed_field2value": "Local: {local_version} \nLatest: {latest_version}",
+ "command_stats_embed_field3name": "Variable Info",
+ "command_stats_embed_field3value": "Name: {NAME} \nPrefix: {PREFIX} \nOwner ID: {ownerid}\nPing line: {PING_LINE} \nMemory Sharing Enabled: {showmemenabled} \nUser Training Enabled: {USERTRAIN_ENABLED}\nSong: {song} \nSplashtext: ```{splashtext}```",
+ "no_image_available": "No images available!",
+ "failed_generate_image": "Failed to generate an image",
+ "markov_model_not_found": "Markov model not found!",
+ "blacklisted": "blacklisted",
+ "blacklisted_user": "Blacklisted user",
+ "edit_fail": "Failed to edit message",
+ "system_info": "System information",
+ "cpu_info": "CPU: {cpu}"
+}
+
diff --git a/assets/locales/es.json b/assets/locales/es.json
new file mode 100644
index 0000000..c2aa734
--- /dev/null
+++ b/assets/locales/es.json
@@ -0,0 +1,77 @@
+{
+ "modification_warning": "Goober ha sido modificado! Se omiten las comprobaciones del servidor por completo...",
+ "reported_version": "Version reportada:",
+ "current_hash": "Hash actual:",
+ "not_found": "no existe!",
+ "version_error": "No se puede obtener la informacion de la version. Codigo de estado",
+ "loaded_cog": "Engranaje cog:",
+ "cog_fail": "No se pudo cargar el cog:",
+ "no_model": "No se encontro ningún modelo de Markov guardado. Empezando desde cero.",
+ "folder_created": "Directorio '{folder_name}' creado.",
+ "folder_exists": "El directorio '{folder_name}' ya existe. Se omite...",
+ "logged_in": "Inicio sesion como",
+ "synced_commands": "Sincronizado",
+ "synced_commands2": "comandos!",
+ "fail_commands_sync": "Error al sincronizar comandos:",
+ "started": "{name} ha empezado!",
+ "name_check": "Error al comprobar la disponibilidad del nombre:",
+ "name_taken": "El nombre ya está en uso. Elija otro.",
+ "name_check2": "Error durante la comprobacion de disponibilidad del nombre:",
+ "add_token": "Token: {token}\nAgregue este token a su archivo .env como",
+ "token_exists": "Hay un token en el archivo .env. Continue con el token existente.",
+ "registration_error": "Error durante el registro:",
+ "version_backup": "Copia de seguridad creada:",
+ "backup_error": "Error: {LOCAL_VERSION_FILE} no encontrado para la copia de seguridad.",
+ "model_loaded": "Modelo de Markov cargado desde",
+ "fetch_update_fail": "No se pudo obtener la informacion de actualizacion.",
+ "invalid_server": "Error: Se recibio informacion de version no valida del servidor.",
+ "new_version": "Nueva version disponible: {latest_version} (Version actual: {local_version})",
+ "changelog": "Consulte {VERSION_URL}/goob/changes.txt para ver el registro de cambios\n\n",
+ "invalid_version": "La version: {local_version} no es valida!",
+ "invalid_version2": "Si esto es lo que pretende, ignore este mensaje; si no, haga clic en Y en su teclado para descargar una version valida del servidor, independientemente de la version que se este ejecutando actualmente.",
+ "invalid_version3": "La version actual se copiara a current_version.bak..",
+ "input": "(Y o cualquier otra tecla para ignorar....)",
+ "modification_ignored": "Has modificado",
+ "modification_ignored2": "IGNOREWARNING es falso",
+ "latest_version": "Usando la ultima version:",
+ "latest_version2": "Consulte {VERSION_URL}/goob/changes.txt para ver el registro de cambios",
+ "pinging_disabled": "El ping esta deshabilitado",
+ "goober_ping_success": "Envie ping a Goober Central!",
+ "goober_ping_fail": "Error al enviar datos. El servidor devolvio el codigo de estado:",
+ "goober_ping_fail2": "Se produjo un error al enviar los datos:",
+ "sentence_positivity": "La positividad de la sentencia es:",
+ "command_edit_fail": "No se pudo editar el mensaje:",
+ "command_desc_retrain": "Vuelve a entrenar el modelo de Markov manualmente.",
+ "command_markov_retrain": "Reentrenando el modelo de Markov... Por favor espere",
+ "command_markov_memory_not_found": "Error: no hay archivo de memoria!",
+ "command_markov_memory_is_corrupt": "Error: el archivo de memoria esta danado!",
+ "command_markov_retraining": "Procesando {processed_data}/{data_size} puntos de datos...",
+ "command_markov_retrain_successful": "Modelo de Markov reentrenado exitosamente usando {data_size} puntos de datos!",
+ "command_desc_talk":"hace que el bot hable",
+ "command_talk_insufficent_text": "Necesito aprender más sobre los mensajes antes de hablar.",
+ "command_talk_generation_fail": "No tengo nada que decir ahora!",
+ "command_desc_help": "Ayuda",
+ "command_help_embed_title": "Ayuda del bot",
+ "command_help_embed_desc": "Lista de comandos agrupados por categoria",
+ "command_help_categories_general": "General",
+ "command_help_categories_admin": "Administracion",
+ "command_help_categories_custom": "Comandos personalizados",
+ "command_ran": "Informacion: {message.author.name} ejecuto {message.content}",
+ "command_desc_ping": "ping",
+ "command_ping_embed_desc": "Latencia del bot:",
+ "command_ping_footer": "Solicitado por",
+ "command_about_desc": "Acerca",
+ "command_about_embed_title": "Acerca de mi",
+ "command_about_embed_field1": "Nombre",
+ "command_about_embed_field2name": "Version",
+ "command_about_embed_field2value": "Version local: {local_version} \nUltima version: {latest_version}",
+ "command_desc_stats": "Estadistica",
+ "command_stats_embed_title": "Estadisticas de bot",
+ "command_stats_embed_desc": "Datos sobre la memoria del bot",
+ "command_stats_embed_field1name": "Estadisticas",
+ "command_stats_embed_field1value": "Tamano: {file_size} bytes\nLineas: {line_count}",
+ "command_stats_embed_field2name": "Version",
+ "command_stats_embed_field2value": "Version local: {local_version} \nUltima version: {latest_version}",
+ "command_stats_embed_field3name": "informacion sobre las variables",
+ "command_stats_embed_field3value": "Nombre: {NAME} \nPrefijo: {PREFIX} \nID del propietario: {ownerid}\nLinea de ping: {PING_LINE} \nCompartir memoria habilitada: {showmemenabled} \nEntrenamiento de usuario habilitado: {USERTRAIN_ENABLED} \nCancion: {song} \nTexto de bienvenida: ```{splashtext}```"
+}
\ No newline at end of file
diff --git a/assets/locales/fi.json b/assets/locales/fi.json
new file mode 100644
index 0000000..7b16005
--- /dev/null
+++ b/assets/locales/fi.json
@@ -0,0 +1,136 @@
+{
+ "memory_file_valid": "memory.json on toimiva!",
+ "file_aint_uft8": "Tiedosto ei ole UTF-8 tekstiä. Saattaa olla binääriä tai korruptoitunut.",
+ "active_users:": "Aktiiviset käyttäjät:",
+ "cog_fail2": "Moduulin lataaminen epäonnistui:",
+ "command_ran_s": "Info: {interaction.user} suoritti",
+ "error_fetching_active_users": "Aktiivisten käyttäjien hankkimisessa tapahtui ongelma: {error}",
+ "error_sending_alive_ping": "Pingin lähettäminen goober centraliin epäonnistui: {error}",
+ "goober_server_alert": "Viesti goober centralista!\n",
+ "loaded_cog2": "Ladattiin moduuli:",
+ "spacy_initialized": "spaCy ja spacytextblob ovat valmiita.",
+ "spacy_model_not_found": "spaCy mallia ei löytynyt! Ladataan se....`",
+ "checks_disabled": "Tarkistukset on poistettu käytöstä!",
+ "unhandled_exception": "Käsittelemätön virhe tapahtui. Ilmoita tästä GitHubissa.",
+ "active_users": "Aktiiviset käyttäjät",
+ "env_file_not_found": ".env-tiedostoa ei löytnyt! Luo tiedosto jossa on tarvittavat muuttujat",
+ "already_started": "Olen jo käynnistynyt! Ei päivitetä...",
+ "please_restart": "Käynnistä uudelleen, hölmö!",
+ "local_ahead": "Paikallinen {remote}/{branch} on edellä ja/tai ajan tasalla. Ohitetaan päivitys...",
+ "remote_ahead": "Etärepositorio {remote}/{branch} on edellä. Päivitetään...",
+ "cant_find_local_version": "Muuttujaa local_version ei löytynyt, tai sitä on muokattu eikä ole kokonaisluku!",
+ "running_prestart_checks": "Suoritetaan esikäynnistystarkistuksia...",
+ "continuing_in_seconds": "Jatketaan {seconds} sekunnin kuluttua... Paina mitä tahansa näppäintä ohittaaksesi.",
+ "missing_requests_psutil": "Kirjastot requests ja psutil puuttuvat! Asenna ne komennolla: `pip install requests psutil`",
+ "requirements_not_found": "Tiedostoa requirements.txt ei löytynyt polusta {path} – onko sitä muokattu?",
+ "warning_failed_parse_imports": "Varoitus: tuontien jäsentäminen epäonnistui tiedostossa {filename}: {error}",
+ "cogs_dir_not_found": "Cogs-kansiota ei löytynyt polusta {path}, ohitetaan tarkistus.",
+ "std_lib_local_skipped": "STD LIB / PAIKALLINEN {package} (tarkistus ohitettu)",
+ "ok_installed": "OK",
+ "missing_package": "PUUTTUU",
+ "missing_package2": "ei ole asennettu",
+ "missing_packages_detected": "Puuttuvia kirjastoja havaittu:",
+ "telling_goober_central": "Ilmoitetaan goober-centralille osoitteessa {url}",
+ "failed_to_contact": "Yhteyden muodostus epäonnistui osoitteeseen {url}: {error}",
+ "all_requirements_satisfied": "Kaikki vaatimukset täyttyvät.",
+ "ping_to": "Ping osoitteeseen {host}: {latency} ms",
+ "high_latency": "Korkea viive havaittu! Vastaukset saattavat hidastua.",
+ "could_not_parse_latency": "Viivettä ei voitu tulkita.",
+ "ping_failed": "Ping osoitteeseen {host} epäonnistui.",
+ "error_running_ping": "Virhe ping-komennon suorittamisessa: {error}",
+ "memory_usage": "Muistin käyttö: {used} Gt / {total} Gt ({percent}%)",
+ "memory_above_90": "Muistin käyttö ylittää 90 % ({percent}%). Harkitse muistin vapauttamista.",
+ "total_memory": "Kokonaismuisti: {total} Gt",
+ "used_memory": "Käytetty muisti: {used} Gt",
+ "low_free_memory": "Vapaa muisti vähissä! Vain {free} Gt jäljellä.",
+ "measuring_cpu": "Mitataan suorittimen käyttöä ytimittäin...",
+ "core_usage": "Ydin {idx}: [{bar}] {usage}%",
+ "total_cpu_usage": "Kokonaisprosessorin käyttö: {usage}%",
+ "high_avg_cpu": "Korkea keskimääräinen prosessorin käyttö: {usage}%",
+ "really_high_cpu": "Erittäin korkea prosessorikuorma! Järjestelmä saattaa hidastua tai jumittua.",
+ "memory_file": "Muistitiedosto: {size} Mt",
+ "memory_file_large": "Muistitiedosto on enemmän kuin 1 Gt – harkitse sen tyhjentämistä tilan vapauttamiseksi.",
+ "memory_file_corrupted": "Muistitiedosto on vioittunut! JSON purkuvirhe: {error}",
+ "consider_backup_memory": "Harkitse muistitiedoston varmuuskopioimista ja uudelleenluontia.",
+ "memory_file_encoding": "Muistitiedostossa on koodausongelmia: {error}",
+ "error_reading_memory": "Virhe muistitiedoston lukemisessa: {error}",
+ "memory_file_not_found": "Muistitiedostoa ei löytynyt.",
+
+ "modification_warning": "Gooberia on muokattu! Ohitetaan palvelimen tarkistus kokonaan...",
+ "reported_version": "Ilmoitettu versio:",
+ "current_hash": "Tämänhetkinen hash:",
+ "not_found": "ei löytynyt!",
+ "version_error": "Versiotietojen saanti epäonnistui.. Tilakoodi:",
+ "loaded_cog": "Ladatut cogit:",
+ "cog_fail": "Cogin lataus epäonnistui kohteelle:",
+ "no_model": "Olemassaolevaa markov-mallia ei löydetty. Aloitetaan alusta.",
+ "folder_created": "Kansio '{folder_name}' luotu.",
+ "folder_exists": "Kansio '{folder_name}' on jo olemassa...",
+ "logged_in": "Kirjauduttiin sisään käyttäjänä",
+ "synced_commands": "Synkronoitiin",
+ "synced_commands2": "komennot!",
+ "fail_commands_sync": "Komentojen synkronointi epäonnistui:",
+ "started": "{name} on käynnistynyt!\nOlet nyt sarjan tähti, beibi!",
+ "name_check": "Nimen saatavuuden tarkistus epäonnistui:",
+ "name_taken": "Nimi on jo käytössä. Valitse toinen nimi.",
+ "name_check2": "Virhe tapahtui nimen saatavuuden tarkistamisessa:",
+ "add_token": "Token: {token}\nLisää tämä .env-tiedostoosi nimellä",
+ "token_exists": "Token on jo olemassa .env-tiedostossa. Jatketaan määritetyllä tokenilla.",
+ "registration_error": "Virhe rekisteröinnissä:",
+ "version_backup": "Varmuuskopio luotu:",
+ "backup_error": "Virhe: {LOCAL_VERSION_FILE}-tiedostoa ei löytynyt varmuuskopiota varten.",
+ "model_loaded": "Markov-malli ladattu",
+ "fetch_update_fail": "Päivitystietojen hankkiminen epäonnistui.",
+ "invalid_server": "Virhe: Palvelin antoi virheellisen versiotietoraportin.",
+ "new_version": "Uusi versio saatavilla: {latest_version} (Tämänhetkinen: {local_version})",
+ "changelog": "Mene osoitteeseen {VERSION_URL}/goob/changes.txt katsotakseen muutoslokin\n\n",
+ "invalid_version": "Versio: {local_version} on virheellinen!",
+ "invalid_version2": "Jos tämä on tahallista, voit jättää tämän viestin huomiotta. Jos tämä ei ole tahallista, paina Y-näppäintä hankkiaksesi kelvollisen version, riippumatta Gooberin tämänhetkisestä versiosta.",
+ "invalid_version3": "Tämänhetkinen versio varmuuskopioidaan kohteeseen current_version.bak..",
+ "input": "(Y:tä tai mitä vaan muuta näppäintä jättää tämän huomioimatta....)",
+ "modification_ignored": "Olet muokannut",
+ "modification_ignored2": "IGNOREWARNING on asetettu false:ksi..",
+ "latest_version": "Käytät uusinta versiota:",
+ "latest_version2": "Tarkista {VERSION_URL}/goob/changes.txt katsotakseen muutosloki",
+ "pinging_disabled": "Pingaus on poistettu käytöstä! En kerro palvelimelle, että olen päällä...",
+ "goober_ping_success": "Lähetettiin olemassaolo ping goober centraliin!",
+ "goober_ping_fail": "Tiedon lähetys epäonnistui. Palvelin antoi tilakoodin:",
+ "goober_ping_fail2": "Tiedon lähettämisen aikana tapahtui virhe:",
+ "sentence_positivity": "Lauseen positiivisuus on:",
+ "command_edit_fail": "Viestin muokkaus epäonnistui:",
+ "command_desc_retrain": "Uudelleenkouluttaa markov-mallin manuaalisesti.",
+ "command_markov_retrain": "Uudelleenkoulutetaan markov-mallia... Odota.",
+ "command_markov_memory_not_found": "Virhe: muistitiedostoa ei löytynyt!",
+ "command_markov_memory_is_corrupt": "Virhe: muistitiedosto on korruptoitu!",
+ "command_markov_retraining": "Käsitellään {processed_data}/{data_size} datapistettä...",
+ "command_markov_retrain_successful": "Markov-malli koulutettiin uudestaan {data_size} datapisteellä!",
+ "command_desc_talk":"puhuu ja sillei",
+ "command_talk_insufficent_text": "Minun pitää oppia lisää viesteistä ennen kun puhun.",
+ "command_talk_generation_fail": "Minulla ei ole mitään sanottavaa!",
+ "command_desc_help": "auta",
+ "command_help_embed_title": "Botin apu",
+ "command_help_embed_desc": "Komennot ryhmitelty kategorioilla",
+ "command_help_categories_general": "Yleiset",
+ "command_help_categories_admin": "Ylläpito",
+ "command_help_categories_custom": "Mukautetut komennot",
+ "command_ran": "Tietoa: {message.author.name} suoritti {message.content}",
+ "command_desc_ping": "ping",
+ "command_ping_embed_desc": "Botin viive:",
+ "command_ping_footer": "Pyytäjä: ",
+ "command_about_desc": "tietoa",
+ "command_about_embed_title": "Tietoa minusta",
+ "command_about_embed_field1": "Nimi",
+ "command_about_embed_field2name": "Versio",
+ "command_about_embed_field2value": "Paikallinen: {local_version} \nUusin: {latest_version}",
+ "command_desc_stats": "statistiikat",
+ "command_stats_embed_title": "Botin statistiikat",
+ "command_stats_embed_desc": "Tietoa botin muistista.",
+ "command_stats_embed_field1name": "Tiedostostatistiikat",
+ "command_stats_embed_field1value": "Koko: {file_size} tavua\nLinjoja: {line_count}",
+ "command_stats_embed_field2name": "Versio",
+ "command_stats_embed_field2value": "Paikallinen: {local_version} \nUusin: {latest_version}",
+ "command_stats_embed_field3name": "Muuttajainformaatio",
+ "command_stats_embed_field3value": "Nimi: {NAME} \nEtuliite: {PREFIX} \nOmistajan ID: {ownerid}\nPing-linja: {PING_LINE} \nMuistin jako päällä: {showmemenabled} \nOppiminen käyttäjistä: {USERTRAIN_ENABLED}\nLaulu: {song} \nRoisketeksti: ```{splashtext}```"
+
+}
+
diff --git a/assets/locales/fr.json b/assets/locales/fr.json
new file mode 100644
index 0000000..572d2f4
--- /dev/null
+++ b/assets/locales/fr.json
@@ -0,0 +1,130 @@
+{
+ "checks_disabled": "Les vérifications sont désactivées !",
+ "unhandled_exception": "Une exception non gérée est survenue. Merci de rapporter ce problème sur GitHub.",
+ "active_users:": "Utilisateurs actifs :",
+ "spacy_initialized": "spaCy et spacytextblob sont prêts.",
+ "spacy_model_not_found": "Le modèle spaCy est introuvable ! Téléchargement en cours...",
+ "env_file_not_found": "Le fichier .env est introuvable ! Créez-en un avec les variables nécessaires.",
+ "error_fetching_active_users": "Erreur lors de la récupération des utilisateurs actifs : {error}",
+ "error_sending_alive_ping": "Erreur lors de l’envoi du ping actif : {error}",
+ "already_started": "J’ai déjà démarré ! Je ne me mets pas à jour...",
+ "please_restart": "Redémarre, stp !",
+ "local_ahead": "Local {remote}/{branch} est en avance ou à jour. Pas de mise à jour...",
+ "remote_ahead": "Remote {remote}/{branch} est en avance. Mise à jour en cours...",
+ "cant_find_local_version": "Je ne trouve pas la variable local_version ! Ou elle a été modifiée et ce n’est pas un entier !",
+ "running_prestart_checks": "Exécution des vérifications préalables au démarrage...",
+ "continuing_in_seconds": "Reprise dans {seconds} secondes... Appuie sur une touche pour passer.",
+ "missing_requests_psutil": "requests et psutil manquants ! Installe-les avec pip : `pip install requests psutil`",
+ "requirements_not_found": "requirements.txt introuvable à {path}, a-t-il été modifié ?",
+ "warning_failed_parse_imports": "Avertissement : Échec du parsing des imports depuis {filename} : {error}",
+ "cogs_dir_not_found": "Répertoire des cogs introuvable à {path}, scan ignoré.",
+ "std_lib_local_skipped": "LIB STD / LOCAL {package} (vérification sautée)",
+ "ok_installed": "OK",
+ "missing_package": "MANQUANT",
+ "missing_package2": "n’est pas installé",
+ "missing_packages_detected": "Packages manquants détectés :",
+ "telling_goober_central": "Envoi à goober central à {url}",
+ "failed_to_contact": "Impossible de contacter {url} : {error}",
+ "all_requirements_satisfied": "Toutes les dépendances sont satisfaites.",
+ "ping_to": "Ping vers {host} : {latency} ms",
+ "high_latency": "Latence élevée détectée ! Tu pourrais avoir des délais de réponse.",
+ "could_not_parse_latency": "Impossible d’analyser la latence.",
+ "ping_failed": "Ping vers {host} échoué.",
+ "error_running_ping": "Erreur lors du ping : {error}",
+ "memory_usage": "Utilisation mémoire : {used} Go / {total} Go ({percent}%)",
+ "memory_above_90": "Usage mémoire au-dessus de 90% ({percent}%). Pense à libérer de la mémoire.",
+ "total_memory": "Mémoire totale : {total} Go",
+ "used_memory": "Mémoire utilisée : {used} Go",
+ "low_free_memory": "Mémoire libre faible détectée ! Seulement {free} Go disponibles.",
+ "measuring_cpu": "Mesure de l’usage CPU par cœur...",
+ "core_usage": "Cœur {idx} : [{bar}] {usage}%",
+ "total_cpu_usage": "Usage total CPU : {usage}%",
+ "high_avg_cpu": "Moyenne CPU élevée : {usage}%",
+ "really_high_cpu": "Charge CPU vraiment élevée ! Le système pourrait ralentir ou planter.",
+ "memory_file": "Fichier mémoire : {size} Mo",
+ "memory_file_large": "Fichier mémoire de 1 Go ou plus, pense à le nettoyer pour libérer de l’espace.",
+ "memory_file_corrupted": "Fichier mémoire corrompu ! Erreur JSON : {error}",
+ "consider_backup_memory": "Pense à sauvegarder et recréer le fichier mémoire.",
+ "memory_file_encoding": "Problèmes d’encodage du fichier mémoire : {error}",
+ "error_reading_memory": "Erreur lecture fichier mémoire : {error}",
+ "memory_file_not_found": "Fichier mémoire introuvable.",
+ "modification_warning": "Goober a été modifié ! Toutes les modifications seront perdues lors d'une mise à jour !",
+ "reported_version": "Version rapportée :",
+ "current_hash": "Hachage actuel :",
+ "not_found": "n'est pas trouvé !",
+ "version_error": "Impossible de récupérer les informations de version. Code d'état",
+ "loaded_cog": "Cog chargé :",
+ "loaded_cog2": "Module chargé :",
+ "cog_fail": "Échec du chargement du cog :",
+ "cog_fail2": "Échec du chargement du module :",
+ "no_model": "Aucun modèle Markov sauvegardé trouvé. Démarrage à partir de zéro.",
+ "folder_created": "Dossier '{folder_name}' créé.",
+ "folder_exists": "Le dossier '{folder_name}' existe déjà. Ignorons...",
+ "logged_in": "Connecté en tant que",
+ "synced_commands": "Synchronisé",
+ "synced_commands2": "commandes !",
+ "fail_commands_sync": "Échec de la synchronisation des commandes :",
+ "started": "{name} a démarré !",
+ "name_check": "Erreur lors de la vérification de la disponibilité du nom :",
+ "name_taken": "Le nom est déjà pris. Veuillez choisir un autre nom.",
+ "name_check2": "Erreur lors de la vérification de la disponibilité du nom :",
+ "add_token": "Token : {token}\nVeuillez ajouter ce token à votre fichier .env comme",
+ "token_exists": "Le token existe déjà dans .env. Utilisation du token existant.",
+ "registration_error": "Erreur lors de l'enregistrement :",
+ "version_backup": "Sauvegarde créée :",
+ "backup_error": "Erreur : {LOCAL_VERSION_FILE} introuvable pour la sauvegarde.",
+ "model_loaded": "Modèle Markov chargé depuis",
+ "fetch_update_fail": "Impossible de récupérer les informations de mise à jour.",
+ "invalid_server": "Erreur : Informations de version invalides reçues du serveur.",
+ "goober_server_alert": "Alerte du serveur Goober central !\n",
+ "new_version": "Nouvelle version disponible : {latest_version} (Actuelle : {local_version})",
+ "changelog": "Consultez {VERSION_URL}/goob/changes.txt pour voir les modifications\n\n",
+ "invalid_version": "La version : {local_version} n'est pas valide !",
+ "invalid_version2": "Si c'est intentionnel, ignorez ce message. Sinon, appuyez sur Y pour récupérer une version valide depuis le serveur, quelle que soit la version actuelle de Goober.",
+ "invalid_version3": "La version actuelle sera sauvegardée dans current_version.bak..",
+ "input": "(Y ou toute autre touche pour ignorer...)",
+ "modification_ignored": "Vous avez modifié",
+ "modification_ignored2": "IGNOREWARNING est désactivé..",
+ "latest_version": "Vous utilisez la dernière version :",
+ "latest_version2": "Consultez {VERSION_URL}/goob/changes.txt pour voir les modifications",
+ "pinging_disabled": "Le ping est désactivé ! Je ne préviens pas le serveur que je suis en ligne...",
+ "goober_ping_success": "Connecté à Goober central en tant que {NAME}",
+ "goober_ping_fail": "Échec de l'envoi des données. Le serveur a retourné le code d'état :",
+ "goober_ping_fail2": "Une erreur est survenue lors de l'envoi des données :",
+ "sentence_positivity": "La positivité de la phrase est :",
+ "command_edit_fail": "Échec de la modification du message :",
+ "command_desc_retrain": "Réentraîne manuellement le modèle Markov.",
+ "command_markov_retrain": "Réentraînement du modèle Markov... Veuillez patienter.",
+ "command_markov_memory_not_found": "Erreur : fichier de mémoire introuvable !",
+ "command_markov_memory_is_corrupt": "Erreur : le fichier de mémoire est corrompu !",
+ "command_markov_retraining": "Traitement de {processed_data}/{data_size} points de données...",
+ "command_markov_retrain_successful": "Modèle Markov réentraîné avec succès en utilisant {data_size} points de données !",
+ "command_desc_talk": "parle et tout ça",
+ "command_talk_insufficent_text": "Je dois apprendre plus de messages avant de pouvoir parler.",
+ "command_talk_generation_fail": "Je n'ai rien à dire pour le moment !",
+ "command_desc_help": "aide",
+ "command_help_embed_title": "Aide du bot",
+ "command_help_embed_desc": "Liste des commandes regroupées par catégorie.",
+ "command_help_categories_general": "Général",
+ "command_help_categories_admin": "Administration",
+ "command_help_categories_custom": "Commandes personnalisées",
+ "command_ran": "Info : {message.author.name} a exécuté {message.content}",
+ "command_ran_s": "Info : {interaction.user} a exécuté ",
+ "command_desc_ping": "ping",
+ "command_ping_embed_desc": "Latence du bot :",
+ "command_ping_footer": "Demandé par",
+ "command_about_desc": "à propos",
+ "command_about_embed_title": "À propos de moi",
+ "command_about_embed_field1": "Nom",
+ "command_about_embed_field2name": "Version",
+ "command_about_embed_field2value": "Locale : {local_version} \nDernière : {latest_version}",
+ "command_desc_stats": "statistiques",
+ "command_stats_embed_title": "Statistiques du bot",
+ "command_stats_embed_desc": "Données sur la mémoire du bot.",
+ "command_stats_embed_field1name": "Statistiques du fichier",
+ "command_stats_embed_field1value": "Taille : {file_size} octets\nLignes : {line_count}",
+ "command_stats_embed_field2name": "Version",
+ "command_stats_embed_field2value": "Locale : {local_version} \nDernière : {latest_version}",
+ "command_stats_embed_field3name": "Informations variables",
+ "command_stats_embed_field3value": "Nom : {NAME} \nPréfixe : {PREFIX} \nID du propriétaire : {ownerid}\nLigne de ping : {PING_LINE} \nPartage de mémoire activé : {showmemenabled} \nEntraînement utilisateur activé : {USERTRAIN_ENABLED} \nChanson : {song} \nTexte de démarrage : ```{splashtext}```"
+}
\ No newline at end of file
diff --git a/assets/locales/it.json b/assets/locales/it.json
new file mode 100644
index 0000000..954b0ce
--- /dev/null
+++ b/assets/locales/it.json
@@ -0,0 +1,137 @@
+{
+ "memory_file_valid": "Il file JSON è valido!",
+ "file_aint_utf8": "Il file non è un UTF-8 valido. Forse è binario?",
+ "psutil_not_installed": "Controllo memoria saltato.",
+ "not_cloned": "Goober non è stato clonato! Clonalo da GitHub.",
+ "checks_disabled": "I controlli sono disabilitati!",
+ "unhandled_exception": "Si è verificata un'eccezione non gestita. Segnala questo problema su GitHub, per favore.",
+ "active_users:": "Utenti attivi:",
+ "spacy_initialized": "spaCy e spacytextblob sono pronti.",
+ "error_fetching_active_users": "Errore nel recupero degli utenti attivi: {error}",
+ "spacy_model_not_found": "Il modello spaCy non è stato trovato! Lo sto scaricando...",
+ "env_file_not_found": "Il file .env non è stato trovato! Crea un file con le variabili richieste.",
+ "error fetching_active_users": "Errore nel recupero degli utenti attivi:",
+ "error_sending_alive_ping": "Errore nell'invio di aliveping:",
+ "already_started": "Sono già avviato! Non aggiorno...",
+ "please_restart": "Riavvia goober!",
+ "local_ahead": "Il ramo locale {remote}/{branch} è aggiornato o avanti. Nessun aggiornamento...",
+ "remote_ahead": "Il ramo remoto {remote}/{branch} è avanti. Aggiornamento in corso...",
+ "cant_find_local_version": "Impossibile trovare la variabile local_version! O è stata manomessa e non è un intero!",
+ "running_prestart_checks": "Esecuzione dei controlli pre-avvio...",
+ "continuing_in_seconds": "Continuo tra {seconds} secondi... Premi un tasto per saltare.",
+ "missing_requests_psutil": "Mancano requests e psutil! Installali con pip: `pip install requests psutil`",
+ "requirements_not_found": "requirements.txt non trovato in {path} è stato manomesso?",
+ "warning_failed_parse_imports": "Attenzione: impossibile analizzare le importazioni da {filename}: {error}",
+ "cogs_dir_not_found": "Cartella cogs non trovata in {path}, scansione saltata.",
+ "std_lib_local_skipped": "LIB STD / LOCALE {package} (controllo saltato)",
+ "ok_installed": "OK",
+ "missing_package": "REQUISITO MANCANTE",
+ "missing_package2": "non è installato",
+ "missing_packages_detected": "Pacchetti mancanti rilevati:",
+ "telling_goober_central": "Segnalazione a goober central su {url}",
+ "failed_to_contact": "Impossibile contattare {url}: {error}",
+ "all_requirements_satisfied": "Tutti i requisiti sono soddisfatti.",
+ "ping_to": "Ping a {host}: {latency} ms",
+ "high_latency": "Latenza elevata rilevata! Potresti riscontrare ritardi nelle risposte.",
+ "could_not_parse_latency": "Impossibile analizzare la latenza.",
+ "ping_failed": "Ping a {host} fallito.",
+ "error_running_ping": "Errore durante l'esecuzione del ping: {error}",
+ "memory_usage": "Utilizzo memoria: {used} GB / {total} GB ({percent}%)",
+ "memory_above_90": "Utilizzo memoria sopra il 90% ({percent}%). Considera di liberare memoria.",
+ "total_memory": "Memoria totale: {total} GB",
+ "used_memory": "Memoria usata: {used} GB",
+ "low_free_memory": "Poca memoria libera! Solo {free} GB disponibili.",
+ "measuring_cpu": "Misurazione utilizzo CPU per core...",
+ "core_usage": "Core {idx}: [{bar}] {usage}%",
+ "total_cpu_usage": "Utilizzo totale CPU: {usage}%",
+ "high_avg_cpu": "Utilizzo medio CPU elevato: {usage}%",
+ "really_high_cpu": "Carico CPU molto alto! Il sistema potrebbe rallentare o bloccarsi.",
+ "memory_file": "File memoria: {size} MB",
+ "memory_file_large": "Il file di memoria è 1GB o più, valuta di svuotarlo.",
+ "memory_file_corrupted": "File memoria corrotto! Errore JSON decode: {error}",
+ "consider_backup_memory": "Valuta di fare un backup e ricreare il file di memoria.",
+ "memory_file_encoding": "Problemi di codifica nel file memoria: {error}",
+ "error_reading_memory": "Errore nella lettura del file memoria: {error}",
+ "memory_file_not_found": "File memoria non trovato.",
+ "modification_warning": "Goober è stato modificato! Verifiche del server saltate completamente...",
+ "reported_version": "Versione segnalata:",
+ "current_hash": "Hash attuale:",
+ "not_found": "non trovato!",
+ "version_error": "Impossibile recuperare le informazioni sulla versione. Codice di stato",
+ "loaded_cog": "Cog caricato:",
+ "cog_fail": "Impossibile caricare il cog:",
+ "loaded_cog2": "Module caricato:",
+ "cog_fail2": "Impossibile caricare il module:",
+ "no_model": "Nessun modello Markov salvato trovato. Iniziamo da zero.",
+ "folder_created": "Cartella '{folder_name}' creata.",
+ "folder_exists": "La cartella '{folder_name}' esiste già. Saltando...",
+ "logged_in": "Accesso effettuato come",
+ "synced_commands": "Sincronizzati",
+ "synced_commands2": "comandi!",
+ "fail_commands_sync": "Impossibile sincronizzare i comandi:",
+ "started": "{name} è stato avviato!\nIl palco è tuo!",
+ "name_check": "Errore nel controllo disponibilità del nome:",
+ "name_taken": "Il nome è già preso. Scegli un nome diverso.",
+ "name_check2": "Errore durante il controllo della disponibilità del nome:",
+ "add_token": "Token: {token}\nAggiungi questo token al tuo file .env come",
+ "token_exists": "Il token esiste già in .env. Continuando con il token esistente.",
+ "goober_server_alert": "Avviso da goober central!\n",
+ "registration_error": "Errore durante la registrazione:",
+ "version_backup": "Backup creato:",
+ "backup_error": "Errore: {LOCAL_VERSION_FILE} non trovato per il backup.",
+ "model_loaded": "Modello Markov caricato da",
+ "fetch_update_fail": "Impossibile recuperare le informazioni sull'aggiornamento.",
+ "invalid_server": "Errore: informazioni sulla versione non valide ricevute dal server.",
+ "new_version": "Nuova versione disponibile: {latest_version} (Attuale: {local_version})",
+ "changelog": "Controlla {VERSION_URL}/goob/changes.txt per vedere il changelog\n\n",
+ "invalid_version": "La versione: {local_version} non è valida!",
+ "invalid_version2": "Se è intenzionale ignora questo messaggio, altrimenti premi Y per scaricare una versione valida dal server indipendentemente dalla versione attuale di goober",
+ "invalid_version3": "La versione attuale sarà salvata come current_version.bak..",
+ "input": "(Y o qualsiasi altro tasto per ignorare....)",
+ "modification_ignored": "Hai modificato",
+ "modification_ignored2": "IGNOREWARNING è impostato su false..",
+ "latest_version": "Stai utilizzando l'ultima versione:",
+ "latest_version2": "Controlla {VERSION_URL}/goob/changes.txt per vedere il changelog",
+ "pinging_disabled": "Il ping è disabilitato! Non dico al server che sono online...",
+ "goober_ping_success": "Accesso a goober central come {NAME}",
+ "goober_ping_fail": "Impossibile inviare i dati. Il server ha restituito il codice di stato:",
+ "goober_ping_fail2": "Si è verificato un errore durante l'invio dei dati:",
+ "sentence_positivity": "La positività della frase è:",
+ "command_edit_fail": "Impossibile modificare il messaggio:",
+ "command_desc_retrain": "Rafforza manualmente il modello Markov.",
+ "command_markov_retrain": "Rafforzamento del modello Markov in corso... Attendere.",
+ "command_markov_memory_not_found": "Errore: file di memoria non trovato!",
+ "command_markov_memory_is_corrupt": "Errore: file di memoria corrotto!",
+ "command_markov_retraining": "Elaborazione di {data_size} punti dati...",
+ "command_markov_retrain_successful": "Modello Markov rafforzato con successo utilizzando {data_size} punti dati!",
+ "command_desc_talk": "parla n come stuf",
+ "command_talk_insufficent_text": "Ho bisogno di imparare di più dai messaggi prima di poter parlare.",
+ "command_talk_generation_fail": "Non ho nulla da dire in questo momento!",
+ "command_desc_help": "aiuto",
+ "command_help_embed_title": "Aiuto Bot",
+ "command_help_embed_desc": "Elenco dei comandi raggruppati per categoria.",
+ "command_help_categories_general": "Generale",
+ "command_help_categories_admin": "Amministrazione",
+ "command_help_categories_custom": "Comandi personalizzati",
+ "command_ran": "Info: {message.author.name} ha eseguito {message.content}",
+ "command_ran_s": "Info: {interaction.user} ha eseguito ",
+ "command_desc_ping": "ping",
+ "command_desc_setlang": "Imposta una nuova lingua per il bot (temporaneamente)",
+ "command_ping_embed_desc": "Latenza del bot:",
+ "command_ping_footer": "Richiesto da",
+ "command_about_desc": "informazioni",
+ "command_about_embed_title": "Informazioni su di me",
+ "command_about_embed_field1": "Nome",
+ "command_about_embed_field2name": "Versione",
+ "command_about_embed_field2value": "Locale: {local_version} \nUltima: {latest_version}",
+ "command_desc_stats": "statistiche",
+ "command_stats_embed_title": "Statistiche del bot",
+ "command_stats_embed_desc": "Dati sulla memoria del bot.",
+ "command_stats_embed_field1name": "Statistiche del file",
+ "command_stats_embed_field1value": "Dimensione: {file_size} byte\nLinee: {line_count}",
+ "command_stats_embed_field2name": "Versione",
+ "command_stats_embed_field2value": "Locale: {local_version} \nUltima: {latest_version}",
+ "command_stats_embed_field3name": "Informazioni sulle variabili",
+ "command_stats_embed_field3value": "Nome: {NAME} \nPrefisso: {PREFIX} \nID Proprietario: {ownerid}\nLinea ping: {PING_LINE} \nMemoria Condivisa Abilitata: {showmemenabled} \nAddestramento Utente Abilitato: {USERTRAIN_ENABLED}\nCanzone: {song} \nSplashtext: ```{splashtext}```"
+ }
+
diff --git a/bot.py b/bot.py
index 9a0d416..6c5a30a 100644
--- a/bot.py
+++ b/bot.py
@@ -1,203 +1,443 @@
-import discord
-from discord.ext import commands, tasks
-import json
-import markovify
-import nltk
-from nltk.tokenize import word_tokenize
-import random
+import logging
+from modules.logger import GooberFormatter
+
+logger = logging.getLogger("goober")
+logger.setLevel(logging.DEBUG)
+
+console_handler = logging.StreamHandler()
+console_handler.setLevel(logging.DEBUG)
+console_handler.setFormatter(GooberFormatter())
+
+file_handler = logging.FileHandler("log.txt", mode="w+", encoding="UTF-8")
+file_handler.setLevel(logging.DEBUG)
+file_handler.setFormatter(GooberFormatter(colors=False))
+
+logger.addHandler(console_handler)
+logger.addHandler(file_handler)
+
import os
-import time
import re
-from dotenv import load_dotenv
-import psutil
-load_dotenv()
-# download NLTK data files
-nltk.download('punkt')
-MEMORY_FILE = "memory.json"
-MEMORY_LOADED_FILE = "MEMORY_LOADED"
-MESSAGEAIID = int(os.getenv("MESSAGEAIID"))
-def load_memory():
- data = []
+import json
+import time
+import random
+import traceback
+import subprocess
+import tempfile
+import shutil
+import sys
+from typing import (
+ List,
+ Dict,
+ Literal,
+ Set,
+ Optional,
+ Tuple,
+ Any,
+ TypedDict,
+ Union,
+ Callable,
+ Coroutine,
+ TypeVar,
+ Type,
+)
+import logging
+from modules.prestartchecks import start_checks
+import modules.keys as k
+from modules import key_compiler
+import logging
+from watchdog.observers import Observer
+from watchdog.events import FileSystemEventHandler
+from modules.settings import instance as settings_manager, ActivityType
+from modules.permission import requires_admin
+from modules.sync_conenctor import instance as sync_connector
- # Try to load data from MEMORY_FILE
- try:
- with open(MEMORY_FILE, "r") as f:
- data = json.load(f)
- except FileNotFoundError:
- pass
-
- return data
-
-# Save memory data to MEMORY_FILE
-def save_memory(memory):
- with open(MEMORY_FILE, "w") as f:
- json.dump(memory, f, indent=4)
-
-def train_markov_model(memory, additional_data=None):
- if not memory:
- return None
- filtered_memory = [line for line in memory if isinstance(line, str)]
- if additional_data:
- filtered_memory.extend(line for line in additional_data if isinstance(line, str))
- if not filtered_memory:
- return None
- text = "\n".join(filtered_memory)
- model = markovify.NewlineText(text, state_size=2)
- return model
-
-#this doesnt work and im extremely pissed and mad
-def append_mentions_to_18digit_integer(message):
- pattern = r'\b\d{18}\b'
- return re.sub(pattern, lambda match: f"<@{match.group(0)}>", message)
-
-def preprocess_message(message):
- message = append_mentions_to_18digit_integer(message)
- tokens = word_tokenize(message)
- tokens = [token for token in tokens if token.isalnum()]
- return " ".join(tokens)
+import threading
-intents = discord.Intents.default()
+def build_keys():
+ key_compiler.build_result(
+ "en",
+ "assets/locales",
+ types=True,
+ output_path="modules/keys.py",
+ generate_comments=True,
+ )
+
+
+build_keys()
+
+
+settings = settings_manager.settings
+
+splash_text: str = ""
+
+k.change_language(settings["locale"])
+
+
+with open(settings["splash_text_loc"], "r", encoding="UTF-8") as f:
+ splash_text = "".join(f.readlines())
+ print(splash_text)
+
+start_checks()
+
+import discord
+from discord.ext import commands
+from discord import app_commands
+from discord import Colour, Message
+
+from better_profanity import profanity
+from discord.ext import commands
+
+from modules.markovmemory import *
+from modules.sentenceprocessing import *
+from modules.unhandledexception import handle_exception
+from modules.image import gen_demotivator
+
+sys.excepthook = handle_exception
+
+
+class MessageMetadata(TypedDict):
+ user_id: str
+ user_name: str
+ guild_id: str | Literal["DM"]
+ guild_name: str | Literal["DM"]
+ channel_id: str
+ channel_name: str
+ message: str
+ timestamp: float
+
+
+# Constants with type hints
+positive_gifs: List[str] = settings["bot"]["misc"]["positive_gifs"]
+currenthash: str = ""
+launched: bool = False
+slash_commands_enabled: bool = False
+
+# Set up Discord bot intents and create bot instance
+intents: discord.Intents = discord.Intents.default()
intents.messages = True
intents.message_content = True
-bot = commands.Bot(command_prefix="g!", intents=intents)
-memory = load_memory()
-markov_model = train_markov_model(memory)
-generated_sentences = set()
-used_words = set()
+bot: commands.Bot = commands.Bot(
+ command_prefix=settings["bot"]["prefix"],
+ intents=intents,
+ allowed_mentions=discord.AllowedMentions(
+ everyone=False, roles=False, users=False, replied_user=True
+ ),
+)
+# Load memory and Markov model for text generation
+memory: List[str | Dict[Literal["_meta"], MessageMetadata]] = load_memory()
+markov_model: Optional[markovify.Text] = load_markov_model()
+if not markov_model:
+ logger.error(k.markov_model_not_found())
+ memory = load_memory()
+ markov_model = train_markov_model(memory)
+
+generated_sentences: Set[str] = set()
+used_words: Set[str] = set()
+
+
+async def load_cogs_from_folder(bot: commands.Bot, folder_name="assets/cogs"):
+ for filename in [file for file in os.listdir(folder_name) if file.endswith(".py")]:
+ cog_name: str = filename[:-3]
+
+ if (
+ "internal" not in folder_name
+ and cog_name not in settings["bot"]["enabled_cogs"]
+ ):
+ logger.debug(f"Skipping cog {cog_name} (not in enabled cogs)")
+ continue
+
+ module_path = folder_name.replace("/", ".").replace("\\", ".") + f".{cog_name}"
+
+ try:
+ await bot.load_extension(module_path)
+ logger.info(f"{k.loaded_cog()} {cog_name}")
+ except Exception as e:
+ logger.error(f"{k.cog_fail()} {cog_name} {e}")
+ traceback.print_exc()
+
+
+# Event: Called when the bot is ready
@bot.event
-async def on_ready():
- print(f"Logged in as {bot.user}")
- post_message.start()
+async def on_ready() -> None:
+ global launched
-@bot.command()
-async def mem(ctx):
- process = psutil.Process(os.getpid())
- mem = process.memory_info().rss
- await ctx.send(f"Total memory used: {mem / 1024 / 1024:.2f} MB")
+ folder_name: str = "cogs"
+ if launched:
+ return
-positive_keywords = ["happy", "good", "great", "amazing", "awesome", "joy", "love", "fantastic", "positive", "cheerful", "victory", "favorite", "lmao", "lol", "xd", "XD", "xD", "Xd"]
+ await load_cogs_from_folder(bot, "assets/cogs/internal")
+ await load_cogs_from_folder(bot)
+ try:
+ synced: List[discord.app_commands.AppCommand] = await bot.tree.sync()
-positive_gifs = [
- "https://tenor.com/view/chill-guy-my-new-character-gif-2777893510283028272",
- "https://tenor.com/view/goodnight-goodnight-friends-weezer-weezer-goodnight-gif-7322052181075806988"
-]
+ logger.info(f"{k.synced_commands()} {len(synced)} {k.synced_commands2()}")
+ logger.info(k.started(settings["name"]))
-def is_positive(sentence):
- sentence_lower = sentence.lower()
- return any(keyword in sentence_lower for keyword in positive_keywords)
+ except discord.errors.Forbidden as perm_error:
+ logger.error(f"Permission error while syncing commands: {perm_error}")
+ logger.error(
+ "Make sure the bot has the 'applications.commands' scope and is invited with the correct permissions."
+ )
+ quit()
+ except Exception as e:
+ logger.error(f"{k.fail_commands_sync()} {e}")
+ traceback.print_exc()
+ quit()
+ if not settings["bot"]["misc"]["activity"]["content"]:
+ return
-def improve_sentence_coherence(sentence):
+ activity_type = discord.ActivityType.unknown
- sentence = sentence.replace(" i ", " I ")
- return sentence
+ settings_activity = settings["bot"]["misc"]["activity"]["type"]
-def rephrase_for_coherence(sentence):
+ activities: Dict[ActivityType, discord.ActivityType] = {
+ "listening": discord.ActivityType.listening,
+ "playing": discord.ActivityType.playing,
+ "streaming": discord.ActivityType.streaming,
+ "competing": discord.ActivityType.competing,
+ "watching": discord.ActivityType.watching,
+ }
- words = sentence.split()
-
- coherent_sentence = " ".join(words)
- return coherent_sentence
-
-bot.help_command = None
+ await bot.change_presence(
+ activity=discord.Activity(
+ type=activities.get(
+ settings["bot"]["misc"]["activity"]["type"],
+ discord.ActivityType.unknown,
+ ),
+ name=settings["bot"]["misc"]["activity"]["content"],
+ )
+ )
+ launched = True
@bot.event
-async def on_message(message):
- global memory, markov_model, last_random_talk_time
+async def on_command_error(ctx: commands.Context, error: commands.CommandError) -> None:
+ from modules.unhandledexception import handle_exception
- if message.author.bot and message.author.id != bot.user.id:
- if markov_model:
- response = None
- for _ in range(10):
- response = markov_model.make_sentence(tries=100)
- if response and response not in generated_sentences:
- response = improve_sentence_coherence(response)
- generated_sentences.add(response)
- break
+ if isinstance(error, commands.CommandInvokeError):
+ original: Exception = error.original
+ handle_exception(
+ type(original),
+ original,
+ original.__traceback__,
+ context=f"Command: {ctx.command} | User: {ctx.author}",
+ )
+ else:
+ handle_exception(
+ type(error),
+ error,
+ error.__traceback__,
+ context=f"Command: {ctx.command} | User: {ctx.author}",
+ )
- if response:
- async with message.channel.typing():
- cleaned_response = re.sub(r'[^\w\s]', '', response).lower()
- coherent_response = rephrase_for_coherence(cleaned_response)
- if random.random() < 0.9:
- if is_positive(coherent_response):
- gif_url = random.choice(positive_gifs)
- combined_message = f"{coherent_response}\n[jif]({gif_url})"
- await message.channel.send(combined_message)
- else:
- await message.channel.send(coherent_response)
- else:
- await message.channel.send(coherent_response)
- else:
- await message.channel.send("I have nothing to say right now!")
+
+# New demotivator command
+@bot.hybrid_command(description="Generate a demotivator poster with two lines of text")
+async def demotivator(ctx: commands.Context) -> None:
+ assets_folder: str = "assets/images"
+ temp_input: str | None = None
+
+ def get_random_asset_image() -> Optional[str]:
+ files: List[str] = [
+ f
+ for f in os.listdir(assets_folder)
+ if f.lower().endswith((".png", ".jpg", ".jpeg", ".webp"))
+ ]
+ if not files:
+ return None
+ return os.path.join(assets_folder, random.choice(files))
+
+ if ctx.message.attachments:
+ attachment: discord.Attachment = ctx.message.attachments[0]
+ if attachment.content_type and attachment.content_type.startswith("image/"):
+ ext: str = os.path.splitext(attachment.filename)[1]
+ temp_input = f"tempy{ext}"
+ with open(temp_input, "wb") as f:
+ await attachment.save(f)
+ input_path: str = temp_input
else:
- await message.channel.send("I need to learn more from messages before I can talk.")
- if message.content and message.author.id != bot.user.id :
- formatted_message = append_mentions_to_18digit_integer(message.content)
- cleaned_message = preprocess_message(formatted_message)
+ fallback_image: Optional[str] = get_random_asset_image()
+ if fallback_image is None:
+ await ctx.reply(k.no_image_available())
+ return
+ temp_input = tempfile.mktemp(suffix=os.path.splitext(fallback_image)[1])
+ shutil.copy(fallback_image, temp_input)
+ input_path = temp_input
+ else:
+ fallback_image = get_random_asset_image()
+ if fallback_image is None:
+ await ctx.reply(k.no_image_available())
+ return
+ temp_input = tempfile.mktemp(suffix=os.path.splitext(fallback_image)[1])
+ shutil.copy(fallback_image, temp_input)
+ input_path = temp_input
+
+ output_path: Optional[str] = await gen_demotivator(input_path) # type: ignore
+
+ if output_path is None or not os.path.isfile(output_path):
+ if temp_input and os.path.exists(temp_input):
+ os.remove(temp_input)
+ await ctx.reply("Failed to generate demotivator.")
+ return
+
+ await ctx.send(file=discord.File(output_path))
+
+ if temp_input and os.path.exists(temp_input):
+ os.remove(temp_input)
+
+
+# Event: Called on every message
+@bot.event
+async def on_message(message: discord.Message) -> None:
+ global memory, markov_model
+ EMOJIS = [
+ "\U0001f604",
+ "\U0001f44d",
+ "\U0001f525",
+ "\U0001f4af",
+ "\U0001f389",
+ "\U0001f60e",
+ ] # originally was emojis but it would probably shit itself on systems without unicode so....
+ if message.author.bot:
+ return
+
+ if message.author.id in settings["bot"]["blacklisted_users"]:
+ return
+
+ commands = [
+ settings["bot"]["prefix"] + command.name for command in bot.tree.get_commands()
+ ]
+
+ if message.content.startswith(tuple(commands)):
+ logger.info(f"{k.command_ran(message.author.name, message.content)}")
+ await bot.process_commands(message)
+ return
+
+ if (
+ profanity.contains_profanity(message.content)
+ and settings["bot"]["misc"]["block_profanity"]
+ ):
+ return
+
+ if message.content:
+ if not settings["bot"]["user_training"]:
+ return
+
+ formatted_message: str = append_mentions_to_18digit_integer(message.content)
+ cleaned_message: str = preprocess_message(formatted_message)
if cleaned_message:
memory.append(cleaned_message)
+
+ message_metadata: MessageMetadata = {
+ "user_id": str(message.author.id),
+ "user_name": str(message.author),
+ "guild_id": str(message.guild.id) if message.guild else "DM",
+ "guild_name": str(message.guild.name) if message.guild else "DM",
+ "channel_id": str(message.channel.id),
+ "channel_name": str(message.channel),
+ "message": message.content,
+ "timestamp": time.time(),
+ }
+ try:
+ if isinstance(memory, list):
+ memory.append({"_meta": message_metadata})
+ else:
+ logger.warning("Memory is not a list; can't append metadata")
+ except Exception as e:
+ logger.warning(f"Failed to append metadata to memory: {e}")
+
save_memory(memory)
- markov_model = train_markov_model(memory)
- # Still process commands even from humans
- if message.content and not message.author.bot:
- await bot.process_commands(message)
+
+ sentiment_score = is_positive(
+ message.content
+ ) # doesnt work but im scared to change the logic now please ignore
+ if sentiment_score > 0.8:
+ if not settings["bot"]["react_to_messages"]:
+ return
+ if not sync_connector.can_react(message.id):
+ logger.info("Sync hub determined that this instance cannot react")
+ return
+
+
+ emoji = random.choice(EMOJIS)
+ try:
+ await message.add_reaction(emoji)
+ except Exception as e:
+ logger.info(f"Failed to react with emoji: {e}")
+
+ await bot.process_commands(message)
-@bot.command()
-async def ping(ctx):
- await ctx.defer()
- #stolen from my expect bot very proud
- latency = round(bot.latency * 1000)
+# Event: Called on every interaction (slash command, etc.)
+@bot.event
+async def on_interaction(interaction: discord.Interaction) -> None:
+ logger.info(f"{k.command_ran_s(interaction.user.name)} {interaction.user.name}")
- LOLembed = discord.Embed(
- title="Pong!!",
- description=(
- f"The Beretta fires fast and won't make you feel any better!\n"
- f"`Bot Latency: {latency}ms`\n"
- ),
- color=discord.Color.blue()
- )
- LOLembed.set_footer(text=f"Requested by {ctx.author.name}", icon_url=ctx.author.avatar.url)
- await ctx.send(embed=LOLembed) # use ctx.send instead of respond because it has nothing to respond to and its not a slash command
+# Global check: Block blacklisted users from running commands
+@bot.check
+async def block_blacklisted(ctx: commands.Context) -> bool:
+ if ctx.author.id not in settings["bot"]["blacklisted_users"]:
+ return True
-@bot.command()
-async def show_memory(ctx):
- memory = load_memory()
- memory_text = json.dumps(memory, indent=4)
- if len(memory_text) > 1024:
- with open(MEMORY_FILE, "r") as f:
- await ctx.send(" ", file=discord.File(f, MEMORY_FILE))
- else:
- embed = discord.Embed(title="Memory Contents", description="The bot's memory.", color=discord.Color.blue())
- embed.add_field(name="Memory Data", value=f"```json\n{memory_text}\n```", inline=False)
- await ctx.send(embed=embed)
+ try:
+ if isinstance(ctx, discord.Interaction):
+ if not ctx.response.is_done():
+ await ctx.response.send_message(k.blacklisted(), ephemeral=True)
+ else:
+ await ctx.followup.send(k.blacklisted(), ephemeral=True)
+ else:
+ await ctx.send(k.blacklisted_user(), ephemeral=True)
+ except:
+ return False
-def improve_sentence_coherence(sentence):
+ return True
+
+
+# Helper: Improve sentence coherence (simple capitalization fix)
+def improve_sentence_coherence(sentence: str) -> str:
+ # Capitalizes "i" to "I" in the sentence
sentence = sentence.replace(" i ", " I ")
return sentence
-@tasks.loop(minutes=60)
-async def post_message():
- channel_id = 1296141985253691433
- channel = bot.get_channel(channel_id)
- if channel and markov_model:
- response = None
- for _ in range(10):
- response = markov_model.make_sentence(tries=100)
- if response and response not in generated_sentences:
- generated_sentences.add(response)
- break
- if response:
- await channel.send(response)
+class OnMyWatch:
+ watchDirectory = "assets/locales"
-# run the bot
-TOKEN = os.getenv("DISCORDBOTTOKEN", "0")
-bot.run(TOKEN)
+ def __init__(self):
+ self.observer = Observer()
+ def run(self):
+ event_handler = Handler()
+ self.observer.schedule(event_handler, self.watchDirectory, recursive=True)
+ self.observer.start()
+ try:
+ while True:
+ time.sleep(5)
+ except:
+ self.observer.stop()
+ print("Observer Stopped")
+
+ self.observer.join()
+
+
+class Handler(FileSystemEventHandler):
+ def on_any_event(self, event):
+ if event.is_directory:
+ return None
+
+ elif event.event_type == "modified":
+ build_keys()
+
+
+observer = Observer()
+observer.schedule(Handler(), "assets/locales")
+observer.start()
+
+# Start the bot
+if __name__ == "__main__":
+ bot.run(os.environ.get("DISCORD_BOT_TOKEN", ""))
diff --git a/modules/README.MD b/modules/README.MD
new file mode 100644
index 0000000..43ce53b
--- /dev/null
+++ b/modules/README.MD
@@ -0,0 +1,8 @@
+# Modules Directory
+
+This folder contains core module files for the project.
+
+**Important:**
+Do **not** modify the files in this directory if you plan to update the project in the future. Any changes made here may be overwritten during updates, or may cause Git to detect modifications and refuse to update properly.
+
+If you need to make changes, consider contributing upstream or using extension mechanisms provided by the project.
\ No newline at end of file
diff --git a/modules/__init__.py b/modules/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/modules/globalvars.py b/modules/globalvars.py
new file mode 100644
index 0000000..7a70f9c
--- /dev/null
+++ b/modules/globalvars.py
@@ -0,0 +1,71 @@
+import os
+import platform
+from typing import Callable, List
+from dotenv import load_dotenv
+import pathlib
+import subprocess
+
+
+def get_git_branch():
+ try:
+ branch = (
+ subprocess.check_output(
+ ["git", "rev-parse", "--abbrev-ref", "HEAD"], stderr=subprocess.DEVNULL
+ )
+ .decode("utf-8")
+ .strip()
+ )
+ return branch
+ except subprocess.CalledProcessError:
+ return None
+
+
+env_path = pathlib.Path(__file__).parent.parent / ".env"
+load_dotenv(dotenv_path=env_path)
+
+available_cogs: Callable[[], List[str]] = lambda: [
+ file[:-3] for file in os.listdir("assets/cogs") if file.endswith(".py")
+]
+
+ANSI = "\033["
+RED = f"{ANSI}31m"
+GREEN = f"{ANSI}32m"
+YELLOW = f"{ANSI}33m"
+PURPLE = f"{ANSI}35m"
+DEBUG = f"{ANSI}90m"
+RESET = f"{ANSI}0m"
+
+VERSION_URL = "https://raw.githubusercontent.com/gooberinc/version/main"
+UPDATE_URL = VERSION_URL + "/latest_version.json"
+print(UPDATE_URL)
+LOCAL_VERSION_FILE = "current_version.txt"
+
+# TOKEN = os.getenv("DISCORDBOTTOKEN", "0")
+# PREFIX = os.getenv("BOTPREFIX", "g.")
+# PING_LINE = os.getenv("PINGLINE")
+# CHECKS_DISABLED = os.getenv("CHECKSDISABLED")
+# LOCALE = os.getenv("LOCALE", "en")
+# BLACKLISTED_USERS = os.getenv("BLACKLISTEDUSERS", "").split(",")
+# USERTRAIN_ENABLED = os.getenv("USERTRAINENABLED", "true").lower() == "true"
+# NAME = os.getenv("NAME")
+# MEMORY_FILE = "memory.json"
+# MEMORY_LOADED_FILE = "MEMORY_LOADED" # is this still even used?? okay just checked its used in the markov module
+# ALIVEPING = os.getenv("ALIVEPING")
+# AUTOUPDATE = os.getenv("AUTOUPDATE")
+# REACT = os.getenv("REACT")
+
+# gooberTOKEN = os.getenv("GOOBERTOKEN")
+# splashtext = os.getenv("SPLASHTEXT")
+# ownerid = int(os.getenv("OWNERID", "0"))
+# showmemenabled = os.getenv("SHOWMEMENABLED")
+
+
+# IGNOREWARNING = False # is this either??? i don't think so?
+# song = os.getenv("song")
+arch = platform.machine()
+slash_commands_enabled = True # 100% broken, its a newer enough version so its probably enabled by default.... fix this at somepoint or hard code it in goober central code
+launched = False
+latest_version = "0.0.0"
+local_version = "2.3.3"
+os.environ["gooberlocal_version"] = local_version
+beta = get_git_branch() == "dev"
diff --git a/modules/image.py b/modules/image.py
new file mode 100644
index 0000000..e5a8e2a
--- /dev/null
+++ b/modules/image.py
@@ -0,0 +1,217 @@
+import os
+import re
+import random
+import shutil
+import tempfile
+from typing import Optional, List
+from PIL import Image, ImageDraw, ImageFont, ImageOps
+from modules.markovmemory import load_markov_model
+from modules.sentenceprocessing import (
+ improve_sentence_coherence,
+ rephrase_for_coherence,
+)
+
+generated_sentences = set()
+
+
+def load_font(size):
+ return ImageFont.truetype("assets/fonts/Impact.ttf", size=size)
+
+
+def load_tnr(size):
+ return ImageFont.truetype("assets/fonts/TNR.ttf", size=size)
+
+
+def draw_text_with_outline(draw, text, x, y, font):
+ outline_offsets = [
+ (-2, -2),
+ (-2, 2),
+ (2, -2),
+ (2, 2),
+ (0, -2),
+ (0, 2),
+ (-2, 0),
+ (2, 0),
+ ]
+ for ox, oy in outline_offsets:
+ draw.text((x + ox, y + oy), text, font=font, fill="black")
+ draw.text((x, y), text, font=font, fill="white")
+
+
+def fits_in_width(text, font, max_width, draw):
+ bbox = draw.textbbox((0, 0), text, font=font)
+ text_width = bbox[2] - bbox[0]
+ return text_width <= max_width
+
+
+def split_text_to_fit(text, font, max_width, draw):
+ words = text.split()
+ for i in range(len(words), 0, -1):
+ top_text = " ".join(words[:i])
+ bottom_text = " ".join(words[i:])
+ if fits_in_width(top_text, font, max_width, draw) and fits_in_width(
+ bottom_text, font, max_width, draw
+ ):
+ return top_text, bottom_text
+ midpoint = len(words) // 2
+ return " ".join(words[:midpoint]), " ".join(words[midpoint:])
+
+
+async def gen_meme(input_image_path, sentence_size=5, max_attempts=10):
+ markov_model = load_markov_model()
+ if not markov_model or not os.path.isfile(input_image_path):
+ return None
+
+ attempt = 0
+ while attempt < max_attempts:
+ with Image.open(input_image_path).convert("RGBA") as img:
+ draw = ImageDraw.Draw(img)
+ width, height = img.size
+
+ font_size = int(height / 10)
+ font = load_font(font_size)
+
+ response = None
+ for _ in range(20):
+ if sentence_size == 1:
+ candidate = markov_model.make_short_sentence(
+ max_chars=100, tries=100
+ )
+ if candidate:
+ candidate = candidate.split()[0]
+ else:
+ candidate = markov_model.make_sentence(
+ tries=100, max_words=sentence_size
+ )
+
+ if candidate and candidate not in generated_sentences:
+ if sentence_size > 1:
+ candidate = improve_sentence_coherence(candidate)
+ generated_sentences.add(candidate)
+ response = candidate
+ break
+
+ if not response:
+ response = "NO TEXT GENERATED"
+
+ cleaned_response = re.sub(r"[^\w\s]", "", response).lower()
+ coherent_response = rephrase_for_coherence(cleaned_response).upper()
+
+ bbox = draw.textbbox((0, 0), coherent_response, font=font)
+ text_width = bbox[2] - bbox[0]
+ text_height_px = bbox[3] - bbox[1]
+ max_text_height = height // 4
+
+ if text_width <= width and text_height_px <= max_text_height:
+ draw_text_with_outline(
+ draw, coherent_response, (width - text_width) / 2, 0, font
+ )
+ img.save(input_image_path)
+ return input_image_path
+ else:
+ top_text, bottom_text = split_text_to_fit(
+ coherent_response, font, width, draw
+ )
+
+ top_bbox = draw.textbbox((0, 0), top_text, font=font)
+ bottom_bbox = draw.textbbox((0, 0), bottom_text, font=font)
+
+ top_height = top_bbox[3] - top_bbox[1]
+ bottom_height = bottom_bbox[3] - bottom_bbox[1]
+
+ if top_height <= max_text_height and bottom_height <= max_text_height:
+ draw_text_with_outline(
+ draw,
+ top_text,
+ (width - (top_bbox[2] - top_bbox[0])) / 2,
+ 0,
+ font,
+ )
+ y_bottom = height - bottom_height - int(height * 0.04)
+ draw_text_with_outline(
+ draw,
+ bottom_text,
+ (width - (bottom_bbox[2] - bottom_bbox[0])) / 2,
+ y_bottom,
+ font,
+ )
+ img.save(input_image_path)
+ return input_image_path
+
+ attempt += 1
+
+ with Image.open(input_image_path).convert("RGBA") as img:
+ draw = ImageDraw.Draw(img)
+ width, height = img.size
+ font_size = int(height / 10)
+ font = load_font(font_size)
+
+ truncated = coherent_response[:100]
+ bbox = draw.textbbox((0, 0), truncated, font=font)
+ text_width = bbox[2] - bbox[0]
+ draw_text_with_outline(draw, truncated, (width - text_width) / 2, 0, font)
+ img.save(input_image_path)
+ return input_image_path
+
+
+async def gen_demotivator(input_image_path, max_attempts=5):
+ markov_model = load_markov_model()
+ if not markov_model or not os.path.isfile(input_image_path):
+ return None
+
+ attempt = 0
+ while attempt < max_attempts:
+ with Image.open(input_image_path).convert("RGB") as img:
+ size = max(img.width, img.height)
+ frame_thick = int(size * 0.0054)
+ inner_size = size - 2 * frame_thick
+ resized_img = img.resize((inner_size, inner_size), Image.LANCZOS)
+ framed = Image.new("RGB", (size, size), "white")
+ framed.paste(resized_img, (frame_thick, frame_thick))
+ landscape_w = int(size * 1.5)
+ caption_h = int(size * 0.3)
+ canvas_h = framed.height + caption_h
+ canvas = Image.new("RGB", (landscape_w, canvas_h), "black")
+ # the above logic didnt even work, fml
+ fx = (landscape_w - framed.width) // 2
+ canvas.paste(framed, (fx, 0))
+
+ draw = ImageDraw.Draw(canvas)
+
+ title = subtitle = None
+ for _ in range(20):
+ t = markov_model.make_sentence(tries=100, max_words=4)
+ s = markov_model.make_sentence(tries=100, max_words=5)
+ if t and s and t != s:
+ title = t.upper()
+ subtitle = s.capitalize()
+ break
+ if not title:
+ title = "DEMOTIVATOR"
+ if not subtitle:
+ subtitle = "no text generated"
+
+ title_sz = int(caption_h * 0.4)
+ sub_sz = int(caption_h * 0.25)
+ title_font = load_tnr(title_sz)
+ sub_font = load_tnr(sub_sz)
+
+ bbox = draw.textbbox((0, 0), title, font=title_font)
+ txw, txh = bbox[2] - bbox[0], bbox[3] - bbox[1]
+ tx = (landscape_w - txw) // 2
+ ty = framed.height + int(caption_h * 0.1)
+ draw_text_with_outline(draw, title, tx, ty, title_font)
+
+ bbox = draw.textbbox((0, 0), subtitle, font=sub_font)
+ sxw, sxh = bbox[2] - bbox[0], bbox[3] - bbox[1]
+ sx = (landscape_w - sxw) // 2
+ sy = ty + txh + int(caption_h * 0.05)
+ for ox, oy in [(-1, -1), (1, -1), (-1, 1), (1, 1)]:
+ draw.text((sx + ox, sy + oy), subtitle, font=sub_font, fill="black")
+ draw.text((sx, sy), subtitle, font=sub_font, fill="#AAAAAA")
+
+ canvas.save(input_image_path)
+ return input_image_path
+
+ attempt += 1
+ return None
diff --git a/modules/key_compiler.py b/modules/key_compiler.py
new file mode 100644
index 0000000..7385dbd
--- /dev/null
+++ b/modules/key_compiler.py
@@ -0,0 +1,220 @@
+# The MIT License (MIT)
+
+# Copyright (c) 2025 ctih1
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+import os
+from typing import Dict, List, Literal
+import json
+import sys
+import logging
+import time
+
+NOTICE = """
+# This file was automatically created from localization JSON files.
+# DO NOT EDIT THIS FILE DIRECTLY. If you want to edit a translation, please use the language's JSON file.
+
+#fmt: off
+"""
+
+
+logger = logging.getLogger("kaannos")
+
+
+class LanguageCollector:
+ def __init__(self, language_dir: str) -> None:
+ self.path: str = language_dir
+ self.languages: Dict[str, Dict[str, str]] = {}
+
+ for file in os.listdir(self.path):
+ if not file.endswith(".json") or len(file) > 7:
+ logger.debug(f"Skipping {file}")
+ continue
+
+ locale: str = file.split(".json")[0]
+ logger.info(f"Discovered {file}")
+ with open(os.path.join(self.path, file), "r", encoding="UTF-8") as f:
+ keys: Dict[str, str] = json.load(f)
+ self.languages[locale] = keys
+
+ self.find_missing_keys()
+
+ def find_missing_keys(self) -> None:
+ primary_language_keys: Dict[str, str] = self.languages["en"]
+
+ for key in primary_language_keys:
+ for language in self.languages:
+ if key not in self.languages[language]:
+ logger.warning(f"Key {key} missing from {language}")
+
+ for language in self.languages:
+ for key in self.languages[language]:
+ if key not in primary_language_keys:
+ logger.warning(f"Leftover key {key} found from {language}")
+
+
+class Script:
+ def __init__(self) -> None:
+ self.script: str = ""
+
+ def add_line(self, content, indent: int = 0, newline: bool = True) -> None:
+ tabs = "\t" * indent
+ newline_content = "\n" if newline else ""
+
+ self.script += f"{tabs}{content}{newline_content}"
+
+
+def process_name(key: str) -> str:
+ return key.replace(" ", "_").replace(":", "").lower()
+
+
+def find_args(string: str) -> List[str]:
+ variable_open: bool = False
+ temp_content: str = ""
+
+ variables: List[str] = []
+ for char in string:
+ if variable_open:
+ if char == "}":
+ variable_open = False
+ variables.append(temp_content)
+ temp_content = ""
+ continue
+
+ if char == "{":
+ raise SyntaxError("Variable already open!")
+
+ temp_content += char
+
+ else:
+ if char == "}":
+ raise SyntaxError("Trying to close a nonexistant variable")
+
+ if char == "{":
+ variable_open = True
+
+ return variables
+
+
+def convert_args(
+ inp: str, vars: List[str], mode: Literal["brackets", "none"] = "brackets"
+) -> str:
+ replacements = {".": "_", ",": "_"}
+
+ for var in vars:
+ cleaned_var = var
+ for key, val in replacements.items():
+ cleaned_var = cleaned_var.replace(key, val)
+
+ if mode == "none":
+ inp = inp.replace(f"{var}", f"{cleaned_var}")
+ else:
+ inp = inp.replace(f"{{{var}}}", f"{{{cleaned_var}}}")
+
+ return inp
+
+
+class GenerateScript:
+ def __init__(
+ self,
+ primary_lang: str,
+ language_data: Dict[str, Dict[str, str]],
+ use_typing: bool = True,
+ output_path: str = "out.py",
+ generate_comments: bool = True,
+ ):
+ self.data = language_data
+ self.primary = primary_lang
+ self.script = Script()
+ self.uses_typing: bool = use_typing
+ self.output = output_path
+ self.generate_comments = generate_comments
+
+ def create(self):
+ # I really don't like this implementation but also it works
+ self.script.add_line(NOTICE)
+ if self.uses_typing:
+ self.script.add_line("from typing import Literal, List")
+ self.script.add_line(f"Language=Literal{list(self.data.keys())}")
+ self.script.add_line(
+ f"languages: List[Language] = {list(self.data.keys())}"
+ )
+ self.script.add_line(f"default_lang: Language | str='{self.primary}'")
+ self.script.add_line(
+ "def change_language(new_lang: Language | str) -> None: global default_lang; default_lang = new_lang"
+ )
+ else:
+ self.script.add_line(f"languages = {list(self.data.keys())}")
+ self.script.add_line(f"default_lang='{self.primary}'")
+ self.script.add_line(
+ "def change_language(new_lang): global default_lang; default_lang = new_lang"
+ )
+
+ self.primary_data = self.data[self.primary]
+
+ for key in self.primary_data:
+ args = find_args(self.primary_data[key])
+
+ self.script.add_line(
+ f"def {process_name(key)}({convert_args(','.join([*args, 'lang:str|None=None' if self.uses_typing else 'lang']), args, 'none')}):"
+ )
+ if self.generate_comments:
+ self.script.add_line('"""', 1)
+ self.script.add_line("### Locales", 1)
+ for language in self.data:
+ self.script.add_line(
+ f"- {language.capitalize()}: **{self.data[language].get(key, self.primary_data[key])}**",
+ 1,
+ )
+ self.script.add_line('"""', 1)
+ self.script.add_line("if not lang: lang=default_lang", 1)
+ for language in self.data:
+ formatted_map = "{"
+ for arg in args:
+ formatted_map += f'"{convert_args(arg, args, "none")}": {convert_args(arg, args, "none")},'
+ formatted_map = formatted_map[:-1] + "}"
+ self.script.add_line(
+ f"""if lang == '{language}': return {convert_args(json.dumps(
+ self.data[language].get(key,self.primary_data[key]),
+ ensure_ascii=False
+ ), args)}{f'.format_map({formatted_map})' if len(args) > 0 else ''}""",
+ 1,
+ )
+
+ self.script.add_line(
+ "else: raise ValueError(f'Invalid language {lang}')", 1
+ )
+ with open(self.output, "w", encoding="UTF-8") as f:
+ f.write(self.script.script)
+
+
+def build_result(
+ primary_lang: str,
+ locale_dir: str,
+ types: bool,
+ output_path: str,
+ generate_comments: bool = True,
+):
+ start = time.time()
+ lc = LanguageCollector(locale_dir)
+ GenerateScript(
+ primary_lang, lc.languages, types, output_path, generate_comments
+ ).create()
+ logger.info(f"Done in {time.time() - start}s")
diff --git a/modules/keys.py b/modules/keys.py
new file mode 100644
index 0000000..3000f50
--- /dev/null
+++ b/modules/keys.py
@@ -0,0 +1,2340 @@
+
+# This file was automatically created from localization JSON files.
+# DO NOT EDIT THIS FILE DIRECTLY. If you want to edit a translation, please use the language's JSON file.
+
+#fmt: off
+
+from typing import Literal, List
+Language=Literal['en', 'es', 'fi', 'fr', 'it']
+languages: List[Language] = ['en', 'es', 'fi', 'fr', 'it']
+default_lang: Language | str='en'
+def change_language(new_lang: Language | str) -> None: global default_lang; default_lang = new_lang
+def memory_file_valid(lang:str|None=None):
+ """
+ ### Locales
+ - En: **The memory.json file is valid!**
+ - Es: **The memory.json file is valid!**
+ - Fi: **memory.json on toimiva!**
+ - Fr: **The memory.json file is valid!**
+ - It: **Il file JSON è valido!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "The memory.json file is valid!"
+ if lang == 'es': return "The memory.json file is valid!"
+ if lang == 'fi': return "memory.json on toimiva!"
+ if lang == 'fr': return "The memory.json file is valid!"
+ if lang == 'it': return "Il file JSON è valido!"
+ else: raise ValueError(f'Invalid language {lang}')
+def file_aint_uft8(lang:str|None=None):
+ """
+ ### Locales
+ - En: **File is not valid UTF-8 text. Might be binary or corrupted.**
+ - Es: **File is not valid UTF-8 text. Might be binary or corrupted.**
+ - Fi: **Tiedosto ei ole UTF-8 tekstiä. Saattaa olla binääriä tai korruptoitunut.**
+ - Fr: **File is not valid UTF-8 text. Might be binary or corrupted.**
+ - It: **File is not valid UTF-8 text. Might be binary or corrupted.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "File is not valid UTF-8 text. Might be binary or corrupted."
+ if lang == 'es': return "File is not valid UTF-8 text. Might be binary or corrupted."
+ if lang == 'fi': return "Tiedosto ei ole UTF-8 tekstiä. Saattaa olla binääriä tai korruptoitunut."
+ if lang == 'fr': return "File is not valid UTF-8 text. Might be binary or corrupted."
+ if lang == 'it': return "File is not valid UTF-8 text. Might be binary or corrupted."
+ else: raise ValueError(f'Invalid language {lang}')
+def psutil_not_installed(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Memory check skipped.**
+ - Es: **Memory check skipped.**
+ - Fi: **Memory check skipped.**
+ - Fr: **Memory check skipped.**
+ - It: **Controllo memoria saltato.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Memory check skipped."
+ if lang == 'es': return "Memory check skipped."
+ if lang == 'fi': return "Memory check skipped."
+ if lang == 'fr': return "Memory check skipped."
+ if lang == 'it': return "Controllo memoria saltato."
+ else: raise ValueError(f'Invalid language {lang}')
+def not_cloned(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Goober is not cloned! Please clone it from GitHub.**
+ - Es: **Goober is not cloned! Please clone it from GitHub.**
+ - Fi: **Goober is not cloned! Please clone it from GitHub.**
+ - Fr: **Goober is not cloned! Please clone it from GitHub.**
+ - It: **Goober non è stato clonato! Clonalo da GitHub.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Goober is not cloned! Please clone it from GitHub."
+ if lang == 'es': return "Goober is not cloned! Please clone it from GitHub."
+ if lang == 'fi': return "Goober is not cloned! Please clone it from GitHub."
+ if lang == 'fr': return "Goober is not cloned! Please clone it from GitHub."
+ if lang == 'it': return "Goober non è stato clonato! Clonalo da GitHub."
+ else: raise ValueError(f'Invalid language {lang}')
+def checks_disabled(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Checks are disabled!**
+ - Es: **Checks are disabled!**
+ - Fi: **Tarkistukset on poistettu käytöstä!**
+ - Fr: **Les vérifications sont désactivées !**
+ - It: **I controlli sono disabilitati!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Checks are disabled!"
+ if lang == 'es': return "Checks are disabled!"
+ if lang == 'fi': return "Tarkistukset on poistettu käytöstä!"
+ if lang == 'fr': return "Les vérifications sont désactivées !"
+ if lang == 'it': return "I controlli sono disabilitati!"
+ else: raise ValueError(f'Invalid language {lang}')
+def unhandled_exception(lang:str|None=None):
+ """
+ ### Locales
+ - En: **An unhandled exception occurred. Please report this issue on GitHub.**
+ - Es: **An unhandled exception occurred. Please report this issue on GitHub.**
+ - Fi: **Käsittelemätön virhe tapahtui. Ilmoita tästä GitHubissa.**
+ - Fr: **Une exception non gérée est survenue. Merci de rapporter ce problème sur GitHub.**
+ - It: **Si è verificata un'eccezione non gestita. Segnala questo problema su GitHub, per favore.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "An unhandled exception occurred. Please report this issue on GitHub."
+ if lang == 'es': return "An unhandled exception occurred. Please report this issue on GitHub."
+ if lang == 'fi': return "Käsittelemätön virhe tapahtui. Ilmoita tästä GitHubissa."
+ if lang == 'fr': return "Une exception non gérée est survenue. Merci de rapporter ce problème sur GitHub."
+ if lang == 'it': return "Si è verificata un'eccezione non gestita. Segnala questo problema su GitHub, per favore."
+ else: raise ValueError(f'Invalid language {lang}')
+def active_users(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Active users:**
+ - Es: **Active users:**
+ - Fi: **Aktiiviset käyttäjät:**
+ - Fr: **Utilisateurs actifs :**
+ - It: **Utenti attivi:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Active users:"
+ if lang == 'es': return "Active users:"
+ if lang == 'fi': return "Aktiiviset käyttäjät:"
+ if lang == 'fr': return "Utilisateurs actifs :"
+ if lang == 'it': return "Utenti attivi:"
+ else: raise ValueError(f'Invalid language {lang}')
+def spacy_initialized(lang:str|None=None):
+ """
+ ### Locales
+ - En: **spaCy and spacytextblob are ready.**
+ - Es: **spaCy and spacytextblob are ready.**
+ - Fi: **spaCy ja spacytextblob ovat valmiita.**
+ - Fr: **spaCy et spacytextblob sont prêts.**
+ - It: **spaCy e spacytextblob sono pronti.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "spaCy and spacytextblob are ready."
+ if lang == 'es': return "spaCy and spacytextblob are ready."
+ if lang == 'fi': return "spaCy ja spacytextblob ovat valmiita."
+ if lang == 'fr': return "spaCy et spacytextblob sont prêts."
+ if lang == 'it': return "spaCy e spacytextblob sono pronti."
+ else: raise ValueError(f'Invalid language {lang}')
+def spacy_model_not_found(lang:str|None=None):
+ """
+ ### Locales
+ - En: **The spaCy model was not found! Downloading it....`**
+ - Es: **The spaCy model was not found! Downloading it....`**
+ - Fi: **spaCy mallia ei löytynyt! Ladataan se....`**
+ - Fr: **Le modèle spaCy est introuvable ! Téléchargement en cours...**
+ - It: **Il modello spaCy non è stato trovato! Lo sto scaricando...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "The spaCy model was not found! Downloading it....`"
+ if lang == 'es': return "The spaCy model was not found! Downloading it....`"
+ if lang == 'fi': return "spaCy mallia ei löytynyt! Ladataan se....`"
+ if lang == 'fr': return "Le modèle spaCy est introuvable ! Téléchargement en cours..."
+ if lang == 'it': return "Il modello spaCy non è stato trovato! Lo sto scaricando..."
+ else: raise ValueError(f'Invalid language {lang}')
+def env_file_not_found(lang:str|None=None):
+ """
+ ### Locales
+ - En: **The .env file was not found! Please create one with the required variables.**
+ - Es: **The .env file was not found! Please create one with the required variables.**
+ - Fi: **.env-tiedostoa ei löytnyt! Luo tiedosto jossa on tarvittavat muuttujat**
+ - Fr: **Le fichier .env est introuvable ! Créez-en un avec les variables nécessaires.**
+ - It: **Il file .env non è stato trovato! Crea un file con le variabili richieste.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "The .env file was not found! Please create one with the required variables."
+ if lang == 'es': return "The .env file was not found! Please create one with the required variables."
+ if lang == 'fi': return ".env-tiedostoa ei löytnyt! Luo tiedosto jossa on tarvittavat muuttujat"
+ if lang == 'fr': return "Le fichier .env est introuvable ! Créez-en un avec les variables nécessaires."
+ if lang == 'it': return "Il file .env non è stato trovato! Crea un file con le variabili richieste."
+ else: raise ValueError(f'Invalid language {lang}')
+def error_fetching_active_users(error,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error fetching active users: {error}**
+ - Es: **Error fetching active users: {error}**
+ - Fi: **Aktiivisten käyttäjien hankkimisessa tapahtui ongelma: {error}**
+ - Fr: **Erreur lors de la récupération des utilisateurs actifs : {error}**
+ - It: **Errore nel recupero degli utenti attivi: {error}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error fetching active users: {error}".format_map({"error": error})
+ if lang == 'es': return "Error fetching active users: {error}".format_map({"error": error})
+ if lang == 'fi': return "Aktiivisten käyttäjien hankkimisessa tapahtui ongelma: {error}".format_map({"error": error})
+ if lang == 'fr': return "Erreur lors de la récupération des utilisateurs actifs : {error}".format_map({"error": error})
+ if lang == 'it': return "Errore nel recupero degli utenti attivi: {error}".format_map({"error": error})
+ else: raise ValueError(f'Invalid language {lang}')
+def error_sending_alive_ping(error,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error sending alive ping: {error}**
+ - Es: **Error sending alive ping: {error}**
+ - Fi: **Pingin lähettäminen goober centraliin epäonnistui: {error}**
+ - Fr: **Erreur lors de l’envoi du ping actif : {error}**
+ - It: **Errore nell'invio di aliveping:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error sending alive ping: {error}".format_map({"error": error})
+ if lang == 'es': return "Error sending alive ping: {error}".format_map({"error": error})
+ if lang == 'fi': return "Pingin lähettäminen goober centraliin epäonnistui: {error}".format_map({"error": error})
+ if lang == 'fr': return "Erreur lors de l’envoi du ping actif : {error}".format_map({"error": error})
+ if lang == 'it': return "Errore nell'invio di aliveping:".format_map({"error": error})
+ else: raise ValueError(f'Invalid language {lang}')
+def already_started(lang:str|None=None):
+ """
+ ### Locales
+ - En: **I've already started! I'm not updating...**
+ - Es: **I've already started! I'm not updating...**
+ - Fi: **Olen jo käynnistynyt! Ei päivitetä...**
+ - Fr: **J’ai déjà démarré ! Je ne me mets pas à jour...**
+ - It: **Sono già avviato! Non aggiorno...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "I've already started! I'm not updating..."
+ if lang == 'es': return "I've already started! I'm not updating..."
+ if lang == 'fi': return "Olen jo käynnistynyt! Ei päivitetä..."
+ if lang == 'fr': return "J’ai déjà démarré ! Je ne me mets pas à jour..."
+ if lang == 'it': return "Sono già avviato! Non aggiorno..."
+ else: raise ValueError(f'Invalid language {lang}')
+def please_restart(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Please Restart goober!**
+ - Es: **Please Restart goober!**
+ - Fi: **Käynnistä uudelleen, hölmö!**
+ - Fr: **Redémarre, stp !**
+ - It: **Riavvia goober!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Please Restart goober!"
+ if lang == 'es': return "Please Restart goober!"
+ if lang == 'fi': return "Käynnistä uudelleen, hölmö!"
+ if lang == 'fr': return "Redémarre, stp !"
+ if lang == 'it': return "Riavvia goober!"
+ else: raise ValueError(f'Invalid language {lang}')
+def local_ahead(remote,branch,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Local {remote}/{branch} is ahead and/or up to par. Not Updating...**
+ - Es: **Local {remote}/{branch} is ahead and/or up to par. Not Updating...**
+ - Fi: **Paikallinen {remote}/{branch} on edellä ja/tai ajan tasalla. Ohitetaan päivitys...**
+ - Fr: **Local {remote}/{branch} est en avance ou à jour. Pas de mise à jour...**
+ - It: **Il ramo locale {remote}/{branch} è aggiornato o avanti. Nessun aggiornamento...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Local {remote}/{branch} is ahead and/or up to par. Not Updating...".format_map({"remote": remote,"branch": branch})
+ if lang == 'es': return "Local {remote}/{branch} is ahead and/or up to par. Not Updating...".format_map({"remote": remote,"branch": branch})
+ if lang == 'fi': return "Paikallinen {remote}/{branch} on edellä ja/tai ajan tasalla. Ohitetaan päivitys...".format_map({"remote": remote,"branch": branch})
+ if lang == 'fr': return "Local {remote}/{branch} est en avance ou à jour. Pas de mise à jour...".format_map({"remote": remote,"branch": branch})
+ if lang == 'it': return "Il ramo locale {remote}/{branch} è aggiornato o avanti. Nessun aggiornamento...".format_map({"remote": remote,"branch": branch})
+ else: raise ValueError(f'Invalid language {lang}')
+def remote_ahead(remote,branch,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Remote {remote}/{branch} is ahead. Updating...**
+ - Es: **Remote {remote}/{branch} is ahead. Updating...**
+ - Fi: **Etärepositorio {remote}/{branch} on edellä. Päivitetään...**
+ - Fr: **Remote {remote}/{branch} est en avance. Mise à jour en cours...**
+ - It: **Il ramo remoto {remote}/{branch} è avanti. Aggiornamento in corso...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Remote {remote}/{branch} is ahead. Updating...".format_map({"remote": remote,"branch": branch})
+ if lang == 'es': return "Remote {remote}/{branch} is ahead. Updating...".format_map({"remote": remote,"branch": branch})
+ if lang == 'fi': return "Etärepositorio {remote}/{branch} on edellä. Päivitetään...".format_map({"remote": remote,"branch": branch})
+ if lang == 'fr': return "Remote {remote}/{branch} est en avance. Mise à jour en cours...".format_map({"remote": remote,"branch": branch})
+ if lang == 'it': return "Il ramo remoto {remote}/{branch} è avanti. Aggiornamento in corso...".format_map({"remote": remote,"branch": branch})
+ else: raise ValueError(f'Invalid language {lang}')
+def cant_find_local_version(lang:str|None=None):
+ """
+ ### Locales
+ - En: **I can't find the local_version variable! Or it's been tampered with and it's not an integer!**
+ - Es: **I can't find the local_version variable! Or it's been tampered with and it's not an integer!**
+ - Fi: **Muuttujaa local_version ei löytynyt, tai sitä on muokattu eikä ole kokonaisluku!**
+ - Fr: **Je ne trouve pas la variable local_version ! Ou elle a été modifiée et ce n’est pas un entier !**
+ - It: **Impossibile trovare la variabile local_version! O è stata manomessa e non è un intero!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "I can't find the local_version variable! Or it's been tampered with and it's not an integer!"
+ if lang == 'es': return "I can't find the local_version variable! Or it's been tampered with and it's not an integer!"
+ if lang == 'fi': return "Muuttujaa local_version ei löytynyt, tai sitä on muokattu eikä ole kokonaisluku!"
+ if lang == 'fr': return "Je ne trouve pas la variable local_version ! Ou elle a été modifiée et ce n’est pas un entier !"
+ if lang == 'it': return "Impossibile trovare la variabile local_version! O è stata manomessa e non è un intero!"
+ else: raise ValueError(f'Invalid language {lang}')
+def running_prestart_checks(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Running pre-start checks...**
+ - Es: **Running pre-start checks...**
+ - Fi: **Suoritetaan esikäynnistystarkistuksia...**
+ - Fr: **Exécution des vérifications préalables au démarrage...**
+ - It: **Esecuzione dei controlli pre-avvio...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Running pre-start checks..."
+ if lang == 'es': return "Running pre-start checks..."
+ if lang == 'fi': return "Suoritetaan esikäynnistystarkistuksia..."
+ if lang == 'fr': return "Exécution des vérifications préalables au démarrage..."
+ if lang == 'it': return "Esecuzione dei controlli pre-avvio..."
+ else: raise ValueError(f'Invalid language {lang}')
+def continuing_in_seconds(seconds,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Continuing in {seconds} seconds... Press any key to skip.**
+ - Es: **Continuing in {seconds} seconds... Press any key to skip.**
+ - Fi: **Jatketaan {seconds} sekunnin kuluttua... Paina mitä tahansa näppäintä ohittaaksesi.**
+ - Fr: **Reprise dans {seconds} secondes... Appuie sur une touche pour passer.**
+ - It: **Continuo tra {seconds} secondi... Premi un tasto per saltare.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Continuing in {seconds} seconds... Press any key to skip.".format_map({"seconds": seconds})
+ if lang == 'es': return "Continuing in {seconds} seconds... Press any key to skip.".format_map({"seconds": seconds})
+ if lang == 'fi': return "Jatketaan {seconds} sekunnin kuluttua... Paina mitä tahansa näppäintä ohittaaksesi.".format_map({"seconds": seconds})
+ if lang == 'fr': return "Reprise dans {seconds} secondes... Appuie sur une touche pour passer.".format_map({"seconds": seconds})
+ if lang == 'it': return "Continuo tra {seconds} secondi... Premi un tasto per saltare.".format_map({"seconds": seconds})
+ else: raise ValueError(f'Invalid language {lang}')
+def missing_requests_psutil(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Missing requests and psutil! Please install them using pip: `pip install requests psutil`**
+ - Es: **Missing requests and psutil! Please install them using pip: `pip install requests psutil`**
+ - Fi: **Kirjastot requests ja psutil puuttuvat! Asenna ne komennolla: `pip install requests psutil`**
+ - Fr: **requests et psutil manquants ! Installe-les avec pip : `pip install requests psutil`**
+ - It: **Mancano requests e psutil! Installali con pip: `pip install requests psutil`**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Missing requests and psutil! Please install them using pip: `pip install requests psutil`"
+ if lang == 'es': return "Missing requests and psutil! Please install them using pip: `pip install requests psutil`"
+ if lang == 'fi': return "Kirjastot requests ja psutil puuttuvat! Asenna ne komennolla: `pip install requests psutil`"
+ if lang == 'fr': return "requests et psutil manquants ! Installe-les avec pip : `pip install requests psutil`"
+ if lang == 'it': return "Mancano requests e psutil! Installali con pip: `pip install requests psutil`"
+ else: raise ValueError(f'Invalid language {lang}')
+def requirements_not_found(path,lang:str|None=None):
+ """
+ ### Locales
+ - En: **requirements.txt not found at {path} was it tampered with?**
+ - Es: **requirements.txt not found at {path} was it tampered with?**
+ - Fi: **Tiedostoa requirements.txt ei löytynyt polusta {path} – onko sitä muokattu?**
+ - Fr: **requirements.txt introuvable à {path}, a-t-il été modifié ?**
+ - It: **requirements.txt non trovato in {path} è stato manomesso?**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "requirements.txt not found at {path} was it tampered with?".format_map({"path": path})
+ if lang == 'es': return "requirements.txt not found at {path} was it tampered with?".format_map({"path": path})
+ if lang == 'fi': return "Tiedostoa requirements.txt ei löytynyt polusta {path} – onko sitä muokattu?".format_map({"path": path})
+ if lang == 'fr': return "requirements.txt introuvable à {path}, a-t-il été modifié ?".format_map({"path": path})
+ if lang == 'it': return "requirements.txt non trovato in {path} è stato manomesso?".format_map({"path": path})
+ else: raise ValueError(f'Invalid language {lang}')
+def warning_failed_parse_imports(filename,error,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Warning: Failed to parse imports from {filename}: {error}**
+ - Es: **Warning: Failed to parse imports from {filename}: {error}**
+ - Fi: **Varoitus: tuontien jäsentäminen epäonnistui tiedostossa {filename}: {error}**
+ - Fr: **Avertissement : Échec du parsing des imports depuis {filename} : {error}**
+ - It: **Attenzione: impossibile analizzare le importazioni da {filename}: {error}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Warning: Failed to parse imports from {filename}: {error}".format_map({"filename": filename,"error": error})
+ if lang == 'es': return "Warning: Failed to parse imports from {filename}: {error}".format_map({"filename": filename,"error": error})
+ if lang == 'fi': return "Varoitus: tuontien jäsentäminen epäonnistui tiedostossa {filename}: {error}".format_map({"filename": filename,"error": error})
+ if lang == 'fr': return "Avertissement : Échec du parsing des imports depuis {filename} : {error}".format_map({"filename": filename,"error": error})
+ if lang == 'it': return "Attenzione: impossibile analizzare le importazioni da {filename}: {error}".format_map({"filename": filename,"error": error})
+ else: raise ValueError(f'Invalid language {lang}')
+def cogs_dir_not_found(path,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Cogs directory not found at {path}, skipping scan.**
+ - Es: **Cogs directory not found at {path}, skipping scan.**
+ - Fi: **Cogs-kansiota ei löytynyt polusta {path}, ohitetaan tarkistus.**
+ - Fr: **Répertoire des cogs introuvable à {path}, scan ignoré.**
+ - It: **Cartella cogs non trovata in {path}, scansione saltata.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Cogs directory not found at {path}, skipping scan.".format_map({"path": path})
+ if lang == 'es': return "Cogs directory not found at {path}, skipping scan.".format_map({"path": path})
+ if lang == 'fi': return "Cogs-kansiota ei löytynyt polusta {path}, ohitetaan tarkistus.".format_map({"path": path})
+ if lang == 'fr': return "Répertoire des cogs introuvable à {path}, scan ignoré.".format_map({"path": path})
+ if lang == 'it': return "Cartella cogs non trovata in {path}, scansione saltata.".format_map({"path": path})
+ else: raise ValueError(f'Invalid language {lang}')
+def std_lib_local_skipped(package,lang:str|None=None):
+ """
+ ### Locales
+ - En: **STD LIB / LOCAL {package} (skipped check)**
+ - Es: **STD LIB / LOCAL {package} (skipped check)**
+ - Fi: **STD LIB / PAIKALLINEN {package} (tarkistus ohitettu)**
+ - Fr: **LIB STD / LOCAL {package} (vérification sautée)**
+ - It: **LIB STD / LOCALE {package} (controllo saltato)**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "STD LIB / LOCAL {package} (skipped check)".format_map({"package": package})
+ if lang == 'es': return "STD LIB / LOCAL {package} (skipped check)".format_map({"package": package})
+ if lang == 'fi': return "STD LIB / PAIKALLINEN {package} (tarkistus ohitettu)".format_map({"package": package})
+ if lang == 'fr': return "LIB STD / LOCAL {package} (vérification sautée)".format_map({"package": package})
+ if lang == 'it': return "LIB STD / LOCALE {package} (controllo saltato)".format_map({"package": package})
+ else: raise ValueError(f'Invalid language {lang}')
+def ok_installed(lang:str|None=None):
+ """
+ ### Locales
+ - En: **OK**
+ - Es: **OK**
+ - Fi: **OK**
+ - Fr: **OK**
+ - It: **OK**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "OK"
+ if lang == 'es': return "OK"
+ if lang == 'fi': return "OK"
+ if lang == 'fr': return "OK"
+ if lang == 'it': return "OK"
+ else: raise ValueError(f'Invalid language {lang}')
+def missing_package(lang:str|None=None):
+ """
+ ### Locales
+ - En: **MISSING**
+ - Es: **MISSING**
+ - Fi: **PUUTTUU**
+ - Fr: **MANQUANT**
+ - It: **REQUISITO MANCANTE**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "MISSING"
+ if lang == 'es': return "MISSING"
+ if lang == 'fi': return "PUUTTUU"
+ if lang == 'fr': return "MANQUANT"
+ if lang == 'it': return "REQUISITO MANCANTE"
+ else: raise ValueError(f'Invalid language {lang}')
+def missing_package2(lang:str|None=None):
+ """
+ ### Locales
+ - En: **is not installed**
+ - Es: **is not installed**
+ - Fi: **ei ole asennettu**
+ - Fr: **n’est pas installé**
+ - It: **non è installato**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "is not installed"
+ if lang == 'es': return "is not installed"
+ if lang == 'fi': return "ei ole asennettu"
+ if lang == 'fr': return "n’est pas installé"
+ if lang == 'it': return "non è installato"
+ else: raise ValueError(f'Invalid language {lang}')
+def missing_packages_detected(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Missing packages detected:**
+ - Es: **Missing packages detected:**
+ - Fi: **Puuttuvia kirjastoja havaittu:**
+ - Fr: **Packages manquants détectés :**
+ - It: **Pacchetti mancanti rilevati:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Missing packages detected:"
+ if lang == 'es': return "Missing packages detected:"
+ if lang == 'fi': return "Puuttuvia kirjastoja havaittu:"
+ if lang == 'fr': return "Packages manquants détectés :"
+ if lang == 'it': return "Pacchetti mancanti rilevati:"
+ else: raise ValueError(f'Invalid language {lang}')
+def telling_goober_central(url,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Telling goober central at {url}**
+ - Es: **Telling goober central at {url}**
+ - Fi: **Ilmoitetaan goober-centralille osoitteessa {url}**
+ - Fr: **Envoi à goober central à {url}**
+ - It: **Segnalazione a goober central su {url}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Telling goober central at {url}".format_map({"url": url})
+ if lang == 'es': return "Telling goober central at {url}".format_map({"url": url})
+ if lang == 'fi': return "Ilmoitetaan goober-centralille osoitteessa {url}".format_map({"url": url})
+ if lang == 'fr': return "Envoi à goober central à {url}".format_map({"url": url})
+ if lang == 'it': return "Segnalazione a goober central su {url}".format_map({"url": url})
+ else: raise ValueError(f'Invalid language {lang}')
+def failed_to_contact(url,error,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Failed to contact {url}: {error}**
+ - Es: **Failed to contact {url}: {error}**
+ - Fi: **Yhteyden muodostus epäonnistui osoitteeseen {url}: {error}**
+ - Fr: **Impossible de contacter {url} : {error}**
+ - It: **Impossibile contattare {url}: {error}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Failed to contact {url}: {error}".format_map({"url": url,"error": error})
+ if lang == 'es': return "Failed to contact {url}: {error}".format_map({"url": url,"error": error})
+ if lang == 'fi': return "Yhteyden muodostus epäonnistui osoitteeseen {url}: {error}".format_map({"url": url,"error": error})
+ if lang == 'fr': return "Impossible de contacter {url} : {error}".format_map({"url": url,"error": error})
+ if lang == 'it': return "Impossibile contattare {url}: {error}".format_map({"url": url,"error": error})
+ else: raise ValueError(f'Invalid language {lang}')
+def all_requirements_satisfied(lang:str|None=None):
+ """
+ ### Locales
+ - En: **All requirements are satisfied.**
+ - Es: **All requirements are satisfied.**
+ - Fi: **Kaikki vaatimukset täyttyvät.**
+ - Fr: **Toutes les dépendances sont satisfaites.**
+ - It: **Tutti i requisiti sono soddisfatti.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "All requirements are satisfied."
+ if lang == 'es': return "All requirements are satisfied."
+ if lang == 'fi': return "Kaikki vaatimukset täyttyvät."
+ if lang == 'fr': return "Toutes les dépendances sont satisfaites."
+ if lang == 'it': return "Tutti i requisiti sono soddisfatti."
+ else: raise ValueError(f'Invalid language {lang}')
+def ping_to(host,latency,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Ping to {host}: {latency} ms**
+ - Es: **Ping to {host}: {latency} ms**
+ - Fi: **Ping osoitteeseen {host}: {latency} ms**
+ - Fr: **Ping vers {host} : {latency} ms**
+ - It: **Ping a {host}: {latency} ms**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Ping to {host}: {latency} ms".format_map({"host": host,"latency": latency})
+ if lang == 'es': return "Ping to {host}: {latency} ms".format_map({"host": host,"latency": latency})
+ if lang == 'fi': return "Ping osoitteeseen {host}: {latency} ms".format_map({"host": host,"latency": latency})
+ if lang == 'fr': return "Ping vers {host} : {latency} ms".format_map({"host": host,"latency": latency})
+ if lang == 'it': return "Ping a {host}: {latency} ms".format_map({"host": host,"latency": latency})
+ else: raise ValueError(f'Invalid language {lang}')
+def high_latency(lang:str|None=None):
+ """
+ ### Locales
+ - En: **High latency detected! You may experience delays in response times.**
+ - Es: **High latency detected! You may experience delays in response times.**
+ - Fi: **Korkea viive havaittu! Vastaukset saattavat hidastua.**
+ - Fr: **Latence élevée détectée ! Tu pourrais avoir des délais de réponse.**
+ - It: **Latenza elevata rilevata! Potresti riscontrare ritardi nelle risposte.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "High latency detected! You may experience delays in response times."
+ if lang == 'es': return "High latency detected! You may experience delays in response times."
+ if lang == 'fi': return "Korkea viive havaittu! Vastaukset saattavat hidastua."
+ if lang == 'fr': return "Latence élevée détectée ! Tu pourrais avoir des délais de réponse."
+ if lang == 'it': return "Latenza elevata rilevata! Potresti riscontrare ritardi nelle risposte."
+ else: raise ValueError(f'Invalid language {lang}')
+def could_not_parse_latency(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Could not parse latency.**
+ - Es: **Could not parse latency.**
+ - Fi: **Viivettä ei voitu tulkita.**
+ - Fr: **Impossible d’analyser la latence.**
+ - It: **Impossibile analizzare la latenza.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Could not parse latency."
+ if lang == 'es': return "Could not parse latency."
+ if lang == 'fi': return "Viivettä ei voitu tulkita."
+ if lang == 'fr': return "Impossible d’analyser la latence."
+ if lang == 'it': return "Impossibile analizzare la latenza."
+ else: raise ValueError(f'Invalid language {lang}')
+def ping_failed(host,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Ping to {host} failed.**
+ - Es: **Ping to {host} failed.**
+ - Fi: **Ping osoitteeseen {host} epäonnistui.**
+ - Fr: **Ping vers {host} échoué.**
+ - It: **Ping a {host} fallito.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Ping to {host} failed.".format_map({"host": host})
+ if lang == 'es': return "Ping to {host} failed.".format_map({"host": host})
+ if lang == 'fi': return "Ping osoitteeseen {host} epäonnistui.".format_map({"host": host})
+ if lang == 'fr': return "Ping vers {host} échoué.".format_map({"host": host})
+ if lang == 'it': return "Ping a {host} fallito.".format_map({"host": host})
+ else: raise ValueError(f'Invalid language {lang}')
+def error_running_ping(error,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error running ping: {error}**
+ - Es: **Error running ping: {error}**
+ - Fi: **Virhe ping-komennon suorittamisessa: {error}**
+ - Fr: **Erreur lors du ping : {error}**
+ - It: **Errore durante l'esecuzione del ping: {error}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error running ping: {error}".format_map({"error": error})
+ if lang == 'es': return "Error running ping: {error}".format_map({"error": error})
+ if lang == 'fi': return "Virhe ping-komennon suorittamisessa: {error}".format_map({"error": error})
+ if lang == 'fr': return "Erreur lors du ping : {error}".format_map({"error": error})
+ if lang == 'it': return "Errore durante l'esecuzione del ping: {error}".format_map({"error": error})
+ else: raise ValueError(f'Invalid language {lang}')
+def memory_usage(used,total,percent,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Memory Usage: {used} GB / {total} GB ({percent}%)**
+ - Es: **Memory Usage: {used} GB / {total} GB ({percent}%)**
+ - Fi: **Muistin käyttö: {used} Gt / {total} Gt ({percent}%)**
+ - Fr: **Utilisation mémoire : {used} Go / {total} Go ({percent}%)**
+ - It: **Utilizzo memoria: {used} GB / {total} GB ({percent}%)**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Memory Usage: {used} GB / {total} GB ({percent}%)".format_map({"used": used,"total": total,"percent": percent})
+ if lang == 'es': return "Memory Usage: {used} GB / {total} GB ({percent}%)".format_map({"used": used,"total": total,"percent": percent})
+ if lang == 'fi': return "Muistin käyttö: {used} Gt / {total} Gt ({percent}%)".format_map({"used": used,"total": total,"percent": percent})
+ if lang == 'fr': return "Utilisation mémoire : {used} Go / {total} Go ({percent}%)".format_map({"used": used,"total": total,"percent": percent})
+ if lang == 'it': return "Utilizzo memoria: {used} GB / {total} GB ({percent}%)".format_map({"used": used,"total": total,"percent": percent})
+ else: raise ValueError(f'Invalid language {lang}')
+def memory_above_90(percent,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Memory usage is above 90% ({percent}%). Consider freeing up memory.**
+ - Es: **Memory usage is above 90% ({percent}%). Consider freeing up memory.**
+ - Fi: **Muistin käyttö ylittää 90 % ({percent}%). Harkitse muistin vapauttamista.**
+ - Fr: **Usage mémoire au-dessus de 90% ({percent}%). Pense à libérer de la mémoire.**
+ - It: **Utilizzo memoria sopra il 90% ({percent}%). Considera di liberare memoria.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Memory usage is above 90% ({percent}%). Consider freeing up memory.".format_map({"percent": percent})
+ if lang == 'es': return "Memory usage is above 90% ({percent}%). Consider freeing up memory.".format_map({"percent": percent})
+ if lang == 'fi': return "Muistin käyttö ylittää 90 % ({percent}%). Harkitse muistin vapauttamista.".format_map({"percent": percent})
+ if lang == 'fr': return "Usage mémoire au-dessus de 90% ({percent}%). Pense à libérer de la mémoire.".format_map({"percent": percent})
+ if lang == 'it': return "Utilizzo memoria sopra il 90% ({percent}%). Considera di liberare memoria.".format_map({"percent": percent})
+ else: raise ValueError(f'Invalid language {lang}')
+def total_memory(total,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Total Memory: {total} GB**
+ - Es: **Total Memory: {total} GB**
+ - Fi: **Kokonaismuisti: {total} Gt**
+ - Fr: **Mémoire totale : {total} Go**
+ - It: **Memoria totale: {total} GB**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Total Memory: {total} GB".format_map({"total": total})
+ if lang == 'es': return "Total Memory: {total} GB".format_map({"total": total})
+ if lang == 'fi': return "Kokonaismuisti: {total} Gt".format_map({"total": total})
+ if lang == 'fr': return "Mémoire totale : {total} Go".format_map({"total": total})
+ if lang == 'it': return "Memoria totale: {total} GB".format_map({"total": total})
+ else: raise ValueError(f'Invalid language {lang}')
+def used_memory(used,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Used Memory: {used} GB**
+ - Es: **Used Memory: {used} GB**
+ - Fi: **Käytetty muisti: {used} Gt**
+ - Fr: **Mémoire utilisée : {used} Go**
+ - It: **Memoria usata: {used} GB**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Used Memory: {used} GB".format_map({"used": used})
+ if lang == 'es': return "Used Memory: {used} GB".format_map({"used": used})
+ if lang == 'fi': return "Käytetty muisti: {used} Gt".format_map({"used": used})
+ if lang == 'fr': return "Mémoire utilisée : {used} Go".format_map({"used": used})
+ if lang == 'it': return "Memoria usata: {used} GB".format_map({"used": used})
+ else: raise ValueError(f'Invalid language {lang}')
+def low_free_memory(free,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Low free memory detected! Only {free} GB available.**
+ - Es: **Low free memory detected! Only {free} GB available.**
+ - Fi: **Vapaa muisti vähissä! Vain {free} Gt jäljellä.**
+ - Fr: **Mémoire libre faible détectée ! Seulement {free} Go disponibles.**
+ - It: **Poca memoria libera! Solo {free} GB disponibili.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Low free memory detected! Only {free} GB available.".format_map({"free": free})
+ if lang == 'es': return "Low free memory detected! Only {free} GB available.".format_map({"free": free})
+ if lang == 'fi': return "Vapaa muisti vähissä! Vain {free} Gt jäljellä.".format_map({"free": free})
+ if lang == 'fr': return "Mémoire libre faible détectée ! Seulement {free} Go disponibles.".format_map({"free": free})
+ if lang == 'it': return "Poca memoria libera! Solo {free} GB disponibili.".format_map({"free": free})
+ else: raise ValueError(f'Invalid language {lang}')
+def measuring_cpu(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Measuring CPU usage per core...**
+ - Es: **Measuring CPU usage per core...**
+ - Fi: **Mitataan suorittimen käyttöä ytimittäin...**
+ - Fr: **Mesure de l’usage CPU par cœur...**
+ - It: **Misurazione utilizzo CPU per core...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Measuring CPU usage per core..."
+ if lang == 'es': return "Measuring CPU usage per core..."
+ if lang == 'fi': return "Mitataan suorittimen käyttöä ytimittäin..."
+ if lang == 'fr': return "Mesure de l’usage CPU par cœur..."
+ if lang == 'it': return "Misurazione utilizzo CPU per core..."
+ else: raise ValueError(f'Invalid language {lang}')
+def core_usage(idx,bar,usage,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Core {idx}: [{bar}] {usage}%**
+ - Es: **Core {idx}: [{bar}] {usage}%**
+ - Fi: **Ydin {idx}: [{bar}] {usage}%**
+ - Fr: **Cœur {idx} : [{bar}] {usage}%**
+ - It: **Core {idx}: [{bar}] {usage}%**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Core {idx}: [{bar}] {usage}%".format_map({"idx": idx,"bar": bar,"usage": usage})
+ if lang == 'es': return "Core {idx}: [{bar}] {usage}%".format_map({"idx": idx,"bar": bar,"usage": usage})
+ if lang == 'fi': return "Ydin {idx}: [{bar}] {usage}%".format_map({"idx": idx,"bar": bar,"usage": usage})
+ if lang == 'fr': return "Cœur {idx} : [{bar}] {usage}%".format_map({"idx": idx,"bar": bar,"usage": usage})
+ if lang == 'it': return "Core {idx}: [{bar}] {usage}%".format_map({"idx": idx,"bar": bar,"usage": usage})
+ else: raise ValueError(f'Invalid language {lang}')
+def total_cpu_usage(usage,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Total CPU Usage: {usage}%**
+ - Es: **Total CPU Usage: {usage}%**
+ - Fi: **Kokonaisprosessorin käyttö: {usage}%**
+ - Fr: **Usage total CPU : {usage}%**
+ - It: **Utilizzo totale CPU: {usage}%**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Total CPU Usage: {usage}%".format_map({"usage": usage})
+ if lang == 'es': return "Total CPU Usage: {usage}%".format_map({"usage": usage})
+ if lang == 'fi': return "Kokonaisprosessorin käyttö: {usage}%".format_map({"usage": usage})
+ if lang == 'fr': return "Usage total CPU : {usage}%".format_map({"usage": usage})
+ if lang == 'it': return "Utilizzo totale CPU: {usage}%".format_map({"usage": usage})
+ else: raise ValueError(f'Invalid language {lang}')
+def high_avg_cpu(usage,lang:str|None=None):
+ """
+ ### Locales
+ - En: **High average CPU usage: {usage}%**
+ - Es: **High average CPU usage: {usage}%**
+ - Fi: **Korkea keskimääräinen prosessorin käyttö: {usage}%**
+ - Fr: **Moyenne CPU élevée : {usage}%**
+ - It: **Utilizzo medio CPU elevato: {usage}%**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "High average CPU usage: {usage}%".format_map({"usage": usage})
+ if lang == 'es': return "High average CPU usage: {usage}%".format_map({"usage": usage})
+ if lang == 'fi': return "Korkea keskimääräinen prosessorin käyttö: {usage}%".format_map({"usage": usage})
+ if lang == 'fr': return "Moyenne CPU élevée : {usage}%".format_map({"usage": usage})
+ if lang == 'it': return "Utilizzo medio CPU elevato: {usage}%".format_map({"usage": usage})
+ else: raise ValueError(f'Invalid language {lang}')
+def really_high_cpu(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Really high CPU load! System may throttle or hang.**
+ - Es: **Really high CPU load! System may throttle or hang.**
+ - Fi: **Erittäin korkea prosessorikuorma! Järjestelmä saattaa hidastua tai jumittua.**
+ - Fr: **Charge CPU vraiment élevée ! Le système pourrait ralentir ou planter.**
+ - It: **Carico CPU molto alto! Il sistema potrebbe rallentare o bloccarsi.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Really high CPU load! System may throttle or hang."
+ if lang == 'es': return "Really high CPU load! System may throttle or hang."
+ if lang == 'fi': return "Erittäin korkea prosessorikuorma! Järjestelmä saattaa hidastua tai jumittua."
+ if lang == 'fr': return "Charge CPU vraiment élevée ! Le système pourrait ralentir ou planter."
+ if lang == 'it': return "Carico CPU molto alto! Il sistema potrebbe rallentare o bloccarsi."
+ else: raise ValueError(f'Invalid language {lang}')
+def memory_file(size,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Memory file: {size} MB**
+ - Es: **Memory file: {size} MB**
+ - Fi: **Muistitiedosto: {size} Mt**
+ - Fr: **Fichier mémoire : {size} Mo**
+ - It: **File memoria: {size} MB**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Memory file: {size} MB".format_map({"size": size})
+ if lang == 'es': return "Memory file: {size} MB".format_map({"size": size})
+ if lang == 'fi': return "Muistitiedosto: {size} Mt".format_map({"size": size})
+ if lang == 'fr': return "Fichier mémoire : {size} Mo".format_map({"size": size})
+ if lang == 'it': return "File memoria: {size} MB".format_map({"size": size})
+ else: raise ValueError(f'Invalid language {lang}')
+def memory_file_large(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Memory file is 1GB or higher, consider clearing it to free up space.**
+ - Es: **Memory file is 1GB or higher, consider clearing it to free up space.**
+ - Fi: **Muistitiedosto on enemmän kuin 1 Gt – harkitse sen tyhjentämistä tilan vapauttamiseksi.**
+ - Fr: **Fichier mémoire de 1 Go ou plus, pense à le nettoyer pour libérer de l’espace.**
+ - It: **Il file di memoria è 1GB o più, valuta di svuotarlo.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Memory file is 1GB or higher, consider clearing it to free up space."
+ if lang == 'es': return "Memory file is 1GB or higher, consider clearing it to free up space."
+ if lang == 'fi': return "Muistitiedosto on enemmän kuin 1 Gt – harkitse sen tyhjentämistä tilan vapauttamiseksi."
+ if lang == 'fr': return "Fichier mémoire de 1 Go ou plus, pense à le nettoyer pour libérer de l’espace."
+ if lang == 'it': return "Il file di memoria è 1GB o più, valuta di svuotarlo."
+ else: raise ValueError(f'Invalid language {lang}')
+def memory_file_corrupted(error,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Memory file is corrupted! JSON decode error: {error}**
+ - Es: **Memory file is corrupted! JSON decode error: {error}**
+ - Fi: **Muistitiedosto on vioittunut! JSON purkuvirhe: {error}**
+ - Fr: **Fichier mémoire corrompu ! Erreur JSON : {error}**
+ - It: **File memoria corrotto! Errore JSON decode: {error}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Memory file is corrupted! JSON decode error: {error}".format_map({"error": error})
+ if lang == 'es': return "Memory file is corrupted! JSON decode error: {error}".format_map({"error": error})
+ if lang == 'fi': return "Muistitiedosto on vioittunut! JSON purkuvirhe: {error}".format_map({"error": error})
+ if lang == 'fr': return "Fichier mémoire corrompu ! Erreur JSON : {error}".format_map({"error": error})
+ if lang == 'it': return "File memoria corrotto! Errore JSON decode: {error}".format_map({"error": error})
+ else: raise ValueError(f'Invalid language {lang}')
+def consider_backup_memory(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Consider backing up and recreating the memory file.**
+ - Es: **Consider backing up and recreating the memory file.**
+ - Fi: **Harkitse muistitiedoston varmuuskopioimista ja uudelleenluontia.**
+ - Fr: **Pense à sauvegarder et recréer le fichier mémoire.**
+ - It: **Valuta di fare un backup e ricreare il file di memoria.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Consider backing up and recreating the memory file."
+ if lang == 'es': return "Consider backing up and recreating the memory file."
+ if lang == 'fi': return "Harkitse muistitiedoston varmuuskopioimista ja uudelleenluontia."
+ if lang == 'fr': return "Pense à sauvegarder et recréer le fichier mémoire."
+ if lang == 'it': return "Valuta di fare un backup e ricreare il file di memoria."
+ else: raise ValueError(f'Invalid language {lang}')
+def memory_file_encoding(error,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Memory file has encoding issues: {error}**
+ - Es: **Memory file has encoding issues: {error}**
+ - Fi: **Muistitiedostossa on koodausongelmia: {error}**
+ - Fr: **Problèmes d’encodage du fichier mémoire : {error}**
+ - It: **Problemi di codifica nel file memoria: {error}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Memory file has encoding issues: {error}".format_map({"error": error})
+ if lang == 'es': return "Memory file has encoding issues: {error}".format_map({"error": error})
+ if lang == 'fi': return "Muistitiedostossa on koodausongelmia: {error}".format_map({"error": error})
+ if lang == 'fr': return "Problèmes d’encodage du fichier mémoire : {error}".format_map({"error": error})
+ if lang == 'it': return "Problemi di codifica nel file memoria: {error}".format_map({"error": error})
+ else: raise ValueError(f'Invalid language {lang}')
+def error_reading_memory(error,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error reading memory file: {error}**
+ - Es: **Error reading memory file: {error}**
+ - Fi: **Virhe muistitiedoston lukemisessa: {error}**
+ - Fr: **Erreur lecture fichier mémoire : {error}**
+ - It: **Errore nella lettura del file memoria: {error}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error reading memory file: {error}".format_map({"error": error})
+ if lang == 'es': return "Error reading memory file: {error}".format_map({"error": error})
+ if lang == 'fi': return "Virhe muistitiedoston lukemisessa: {error}".format_map({"error": error})
+ if lang == 'fr': return "Erreur lecture fichier mémoire : {error}".format_map({"error": error})
+ if lang == 'it': return "Errore nella lettura del file memoria: {error}".format_map({"error": error})
+ else: raise ValueError(f'Invalid language {lang}')
+def memory_file_not_found(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Memory file not found.**
+ - Es: **Memory file not found.**
+ - Fi: **Muistitiedostoa ei löytynyt.**
+ - Fr: **Fichier mémoire introuvable.**
+ - It: **File memoria non trovato.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Memory file not found."
+ if lang == 'es': return "Memory file not found."
+ if lang == 'fi': return "Muistitiedostoa ei löytynyt."
+ if lang == 'fr': return "Fichier mémoire introuvable."
+ if lang == 'it': return "File memoria non trovato."
+ else: raise ValueError(f'Invalid language {lang}')
+def modification_warning(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Goober has been modified! Any changes will be lost in an update!**
+ - Es: **Goober ha sido modificado! Se omiten las comprobaciones del servidor por completo...**
+ - Fi: **Gooberia on muokattu! Ohitetaan palvelimen tarkistus kokonaan...**
+ - Fr: **Goober a été modifié ! Toutes les modifications seront perdues lors d'une mise à jour !**
+ - It: **Goober è stato modificato! Verifiche del server saltate completamente...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Goober has been modified! Any changes will be lost in an update!"
+ if lang == 'es': return "Goober ha sido modificado! Se omiten las comprobaciones del servidor por completo..."
+ if lang == 'fi': return "Gooberia on muokattu! Ohitetaan palvelimen tarkistus kokonaan..."
+ if lang == 'fr': return "Goober a été modifié ! Toutes les modifications seront perdues lors d'une mise à jour !"
+ if lang == 'it': return "Goober è stato modificato! Verifiche del server saltate completamente..."
+ else: raise ValueError(f'Invalid language {lang}')
+def reported_version(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Reported Version:**
+ - Es: **Version reportada:**
+ - Fi: **Ilmoitettu versio:**
+ - Fr: **Version rapportée :**
+ - It: **Versione segnalata:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Reported Version:"
+ if lang == 'es': return "Version reportada:"
+ if lang == 'fi': return "Ilmoitettu versio:"
+ if lang == 'fr': return "Version rapportée :"
+ if lang == 'it': return "Versione segnalata:"
+ else: raise ValueError(f'Invalid language {lang}')
+def current_hash(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Current Hash:**
+ - Es: **Hash actual:**
+ - Fi: **Tämänhetkinen hash:**
+ - Fr: **Hachage actuel :**
+ - It: **Hash attuale:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Current Hash:"
+ if lang == 'es': return "Hash actual:"
+ if lang == 'fi': return "Tämänhetkinen hash:"
+ if lang == 'fr': return "Hachage actuel :"
+ if lang == 'it': return "Hash attuale:"
+ else: raise ValueError(f'Invalid language {lang}')
+def not_found(lang:str|None=None):
+ """
+ ### Locales
+ - En: **is not found!**
+ - Es: **no existe!**
+ - Fi: **ei löytynyt!**
+ - Fr: **n'est pas trouvé !**
+ - It: **non trovato!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "is not found!"
+ if lang == 'es': return "no existe!"
+ if lang == 'fi': return "ei löytynyt!"
+ if lang == 'fr': return "n'est pas trouvé !"
+ if lang == 'it': return "non trovato!"
+ else: raise ValueError(f'Invalid language {lang}')
+def version_error(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Unable to fetch version info. Status code**
+ - Es: **No se puede obtener la informacion de la version. Codigo de estado**
+ - Fi: **Versiotietojen saanti epäonnistui.. Tilakoodi:**
+ - Fr: **Impossible de récupérer les informations de version. Code d'état**
+ - It: **Impossibile recuperare le informazioni sulla versione. Codice di stato**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Unable to fetch version info. Status code"
+ if lang == 'es': return "No se puede obtener la informacion de la version. Codigo de estado"
+ if lang == 'fi': return "Versiotietojen saanti epäonnistui.. Tilakoodi:"
+ if lang == 'fr': return "Impossible de récupérer les informations de version. Code d'état"
+ if lang == 'it': return "Impossibile recuperare le informazioni sulla versione. Codice di stato"
+ else: raise ValueError(f'Invalid language {lang}')
+def loaded_cog(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Loaded cog:**
+ - Es: **Engranaje cog:**
+ - Fi: **Ladatut cogit:**
+ - Fr: **Cog chargé :**
+ - It: **Cog caricato:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Loaded cog:"
+ if lang == 'es': return "Engranaje cog:"
+ if lang == 'fi': return "Ladatut cogit:"
+ if lang == 'fr': return "Cog chargé :"
+ if lang == 'it': return "Cog caricato:"
+ else: raise ValueError(f'Invalid language {lang}')
+def loaded_cog2(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Loaded module:**
+ - Es: **Loaded module:**
+ - Fi: **Ladattiin moduuli:**
+ - Fr: **Module chargé :**
+ - It: **Module caricato:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Loaded module:"
+ if lang == 'es': return "Loaded module:"
+ if lang == 'fi': return "Ladattiin moduuli:"
+ if lang == 'fr': return "Module chargé :"
+ if lang == 'it': return "Module caricato:"
+ else: raise ValueError(f'Invalid language {lang}')
+def cog_fail(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Failed to load cog:**
+ - Es: **No se pudo cargar el cog:**
+ - Fi: **Cogin lataus epäonnistui kohteelle:**
+ - Fr: **Échec du chargement du cog :**
+ - It: **Impossibile caricare il cog:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Failed to load cog:"
+ if lang == 'es': return "No se pudo cargar el cog:"
+ if lang == 'fi': return "Cogin lataus epäonnistui kohteelle:"
+ if lang == 'fr': return "Échec du chargement du cog :"
+ if lang == 'it': return "Impossibile caricare il cog:"
+ else: raise ValueError(f'Invalid language {lang}')
+def cog_fail2(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Failed to load module:**
+ - Es: **Failed to load module:**
+ - Fi: **Moduulin lataaminen epäonnistui:**
+ - Fr: **Échec du chargement du module :**
+ - It: **Impossibile caricare il module:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Failed to load module:"
+ if lang == 'es': return "Failed to load module:"
+ if lang == 'fi': return "Moduulin lataaminen epäonnistui:"
+ if lang == 'fr': return "Échec du chargement du module :"
+ if lang == 'it': return "Impossibile caricare il module:"
+ else: raise ValueError(f'Invalid language {lang}')
+def no_model(lang:str|None=None):
+ """
+ ### Locales
+ - En: **No saved Markov model found. Starting from scratch.**
+ - Es: **No se encontro ningún modelo de Markov guardado. Empezando desde cero.**
+ - Fi: **Olemassaolevaa markov-mallia ei löydetty. Aloitetaan alusta.**
+ - Fr: **Aucun modèle Markov sauvegardé trouvé. Démarrage à partir de zéro.**
+ - It: **Nessun modello Markov salvato trovato. Iniziamo da zero.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "No saved Markov model found. Starting from scratch."
+ if lang == 'es': return "No se encontro ningún modelo de Markov guardado. Empezando desde cero."
+ if lang == 'fi': return "Olemassaolevaa markov-mallia ei löydetty. Aloitetaan alusta."
+ if lang == 'fr': return "Aucun modèle Markov sauvegardé trouvé. Démarrage à partir de zéro."
+ if lang == 'it': return "Nessun modello Markov salvato trovato. Iniziamo da zero."
+ else: raise ValueError(f'Invalid language {lang}')
+def folder_created(folder_name,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Folder '{folder_name}' created.**
+ - Es: **Directorio '{folder_name}' creado.**
+ - Fi: **Kansio '{folder_name}' luotu.**
+ - Fr: **Dossier '{folder_name}' créé.**
+ - It: **Cartella '{folder_name}' creata.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Folder '{folder_name}' created.".format_map({"folder_name": folder_name})
+ if lang == 'es': return "Directorio '{folder_name}' creado.".format_map({"folder_name": folder_name})
+ if lang == 'fi': return "Kansio '{folder_name}' luotu.".format_map({"folder_name": folder_name})
+ if lang == 'fr': return "Dossier '{folder_name}' créé.".format_map({"folder_name": folder_name})
+ if lang == 'it': return "Cartella '{folder_name}' creata.".format_map({"folder_name": folder_name})
+ else: raise ValueError(f'Invalid language {lang}')
+def folder_exists(folder_name,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Folder '{folder_name}' already exists. skipping...**
+ - Es: **El directorio '{folder_name}' ya existe. Se omite...**
+ - Fi: **Kansio '{folder_name}' on jo olemassa...**
+ - Fr: **Le dossier '{folder_name}' existe déjà. Ignorons...**
+ - It: **La cartella '{folder_name}' esiste già. Saltando...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Folder '{folder_name}' already exists. skipping...".format_map({"folder_name": folder_name})
+ if lang == 'es': return "El directorio '{folder_name}' ya existe. Se omite...".format_map({"folder_name": folder_name})
+ if lang == 'fi': return "Kansio '{folder_name}' on jo olemassa...".format_map({"folder_name": folder_name})
+ if lang == 'fr': return "Le dossier '{folder_name}' existe déjà. Ignorons...".format_map({"folder_name": folder_name})
+ if lang == 'it': return "La cartella '{folder_name}' esiste già. Saltando...".format_map({"folder_name": folder_name})
+ else: raise ValueError(f'Invalid language {lang}')
+def logged_in(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Logged in as**
+ - Es: **Inicio sesion como**
+ - Fi: **Kirjauduttiin sisään käyttäjänä**
+ - Fr: **Connecté en tant que**
+ - It: **Accesso effettuato come**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Logged in as"
+ if lang == 'es': return "Inicio sesion como"
+ if lang == 'fi': return "Kirjauduttiin sisään käyttäjänä"
+ if lang == 'fr': return "Connecté en tant que"
+ if lang == 'it': return "Accesso effettuato come"
+ else: raise ValueError(f'Invalid language {lang}')
+def synced_commands(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Synced**
+ - Es: **Sincronizado**
+ - Fi: **Synkronoitiin**
+ - Fr: **Synchronisé**
+ - It: **Sincronizzati**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Synced"
+ if lang == 'es': return "Sincronizado"
+ if lang == 'fi': return "Synkronoitiin"
+ if lang == 'fr': return "Synchronisé"
+ if lang == 'it': return "Sincronizzati"
+ else: raise ValueError(f'Invalid language {lang}')
+def synced_commands2(lang:str|None=None):
+ """
+ ### Locales
+ - En: **commands!**
+ - Es: **comandos!**
+ - Fi: **komennot!**
+ - Fr: **commandes !**
+ - It: **comandi!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "commands!"
+ if lang == 'es': return "comandos!"
+ if lang == 'fi': return "komennot!"
+ if lang == 'fr': return "commandes !"
+ if lang == 'it': return "comandi!"
+ else: raise ValueError(f'Invalid language {lang}')
+def fail_commands_sync(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Failed to sync commands:**
+ - Es: **Error al sincronizar comandos:**
+ - Fi: **Komentojen synkronointi epäonnistui:**
+ - Fr: **Échec de la synchronisation des commandes :**
+ - It: **Impossibile sincronizzare i comandi:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Failed to sync commands:"
+ if lang == 'es': return "Error al sincronizar comandos:"
+ if lang == 'fi': return "Komentojen synkronointi epäonnistui:"
+ if lang == 'fr': return "Échec de la synchronisation des commandes :"
+ if lang == 'it': return "Impossibile sincronizzare i comandi:"
+ else: raise ValueError(f'Invalid language {lang}')
+def started(name,lang:str|None=None):
+ """
+ ### Locales
+ - En: **{name} has started!
+You're the star of the show now baby!**
+ - Es: **{name} ha empezado!**
+ - Fi: **{name} on käynnistynyt!
+Olet nyt sarjan tähti, beibi!**
+ - Fr: **{name} a démarré !**
+ - It: **{name} è stato avviato!
+Il palco è tuo!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "{name} has started!\nYou're the star of the show now baby!".format_map({"name": name})
+ if lang == 'es': return "{name} ha empezado!".format_map({"name": name})
+ if lang == 'fi': return "{name} on käynnistynyt!\nOlet nyt sarjan tähti, beibi!".format_map({"name": name})
+ if lang == 'fr': return "{name} a démarré !".format_map({"name": name})
+ if lang == 'it': return "{name} è stato avviato!\nIl palco è tuo!".format_map({"name": name})
+ else: raise ValueError(f'Invalid language {lang}')
+def name_check(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error checking name availability:**
+ - Es: **Error al comprobar la disponibilidad del nombre:**
+ - Fi: **Nimen saatavuuden tarkistus epäonnistui:**
+ - Fr: **Erreur lors de la vérification de la disponibilité du nom :**
+ - It: **Errore nel controllo disponibilità del nome:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error checking name availability:"
+ if lang == 'es': return "Error al comprobar la disponibilidad del nombre:"
+ if lang == 'fi': return "Nimen saatavuuden tarkistus epäonnistui:"
+ if lang == 'fr': return "Erreur lors de la vérification de la disponibilité du nom :"
+ if lang == 'it': return "Errore nel controllo disponibilità del nome:"
+ else: raise ValueError(f'Invalid language {lang}')
+def name_taken(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Name is already taken. Please choose a different name.**
+ - Es: **El nombre ya está en uso. Elija otro.**
+ - Fi: **Nimi on jo käytössä. Valitse toinen nimi.**
+ - Fr: **Le nom est déjà pris. Veuillez choisir un autre nom.**
+ - It: **Il nome è già preso. Scegli un nome diverso.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Name is already taken. Please choose a different name."
+ if lang == 'es': return "El nombre ya está en uso. Elija otro."
+ if lang == 'fi': return "Nimi on jo käytössä. Valitse toinen nimi."
+ if lang == 'fr': return "Le nom est déjà pris. Veuillez choisir un autre nom."
+ if lang == 'it': return "Il nome è già preso. Scegli un nome diverso."
+ else: raise ValueError(f'Invalid language {lang}')
+def name_check2(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error during name availability check:**
+ - Es: **Error durante la comprobacion de disponibilidad del nombre:**
+ - Fi: **Virhe tapahtui nimen saatavuuden tarkistamisessa:**
+ - Fr: **Erreur lors de la vérification de la disponibilité du nom :**
+ - It: **Errore durante il controllo della disponibilità del nome:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error during name availability check:"
+ if lang == 'es': return "Error durante la comprobacion de disponibilidad del nombre:"
+ if lang == 'fi': return "Virhe tapahtui nimen saatavuuden tarkistamisessa:"
+ if lang == 'fr': return "Erreur lors de la vérification de la disponibilité du nom :"
+ if lang == 'it': return "Errore durante il controllo della disponibilità del nome:"
+ else: raise ValueError(f'Invalid language {lang}')
+def add_token(token,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Token: {token}
+Please add this token to your .env file as**
+ - Es: **Token: {token}
+Agregue este token a su archivo .env como**
+ - Fi: **Token: {token}
+Lisää tämä .env-tiedostoosi nimellä**
+ - Fr: **Token : {token}
+Veuillez ajouter ce token à votre fichier .env comme**
+ - It: **Token: {token}
+Aggiungi questo token al tuo file .env come**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Token: {token}\nPlease add this token to your .env file as".format_map({"token": token})
+ if lang == 'es': return "Token: {token}\nAgregue este token a su archivo .env como".format_map({"token": token})
+ if lang == 'fi': return "Token: {token}\nLisää tämä .env-tiedostoosi nimellä".format_map({"token": token})
+ if lang == 'fr': return "Token : {token}\nVeuillez ajouter ce token à votre fichier .env comme".format_map({"token": token})
+ if lang == 'it': return "Token: {token}\nAggiungi questo token al tuo file .env come".format_map({"token": token})
+ else: raise ValueError(f'Invalid language {lang}')
+def token_exists(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Token already exists in .env. Continuing with the existing token.**
+ - Es: **Hay un token en el archivo .env. Continue con el token existente.**
+ - Fi: **Token on jo olemassa .env-tiedostossa. Jatketaan määritetyllä tokenilla.**
+ - Fr: **Le token existe déjà dans .env. Utilisation du token existant.**
+ - It: **Il token esiste già in .env. Continuando con il token esistente.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Token already exists in .env. Continuing with the existing token."
+ if lang == 'es': return "Hay un token en el archivo .env. Continue con el token existente."
+ if lang == 'fi': return "Token on jo olemassa .env-tiedostossa. Jatketaan määritetyllä tokenilla."
+ if lang == 'fr': return "Le token existe déjà dans .env. Utilisation du token existant."
+ if lang == 'it': return "Il token esiste già in .env. Continuando con il token esistente."
+ else: raise ValueError(f'Invalid language {lang}')
+def registration_error(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error during registration:**
+ - Es: **Error durante el registro:**
+ - Fi: **Virhe rekisteröinnissä:**
+ - Fr: **Erreur lors de l'enregistrement :**
+ - It: **Errore durante la registrazione:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error during registration:"
+ if lang == 'es': return "Error durante el registro:"
+ if lang == 'fi': return "Virhe rekisteröinnissä:"
+ if lang == 'fr': return "Erreur lors de l'enregistrement :"
+ if lang == 'it': return "Errore durante la registrazione:"
+ else: raise ValueError(f'Invalid language {lang}')
+def version_backup(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Backup created:**
+ - Es: **Copia de seguridad creada:**
+ - Fi: **Varmuuskopio luotu:**
+ - Fr: **Sauvegarde créée :**
+ - It: **Backup creato:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Backup created:"
+ if lang == 'es': return "Copia de seguridad creada:"
+ if lang == 'fi': return "Varmuuskopio luotu:"
+ if lang == 'fr': return "Sauvegarde créée :"
+ if lang == 'it': return "Backup creato:"
+ else: raise ValueError(f'Invalid language {lang}')
+def backup_error(LOCAL_VERSION_FILE,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error: {LOCAL_VERSION_FILE} not found for backup.**
+ - Es: **Error: {LOCAL_VERSION_FILE} no encontrado para la copia de seguridad.**
+ - Fi: **Virhe: {LOCAL_VERSION_FILE}-tiedostoa ei löytynyt varmuuskopiota varten.**
+ - Fr: **Erreur : {LOCAL_VERSION_FILE} introuvable pour la sauvegarde.**
+ - It: **Errore: {LOCAL_VERSION_FILE} non trovato per il backup.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error: {LOCAL_VERSION_FILE} not found for backup.".format_map({"LOCAL_VERSION_FILE": LOCAL_VERSION_FILE})
+ if lang == 'es': return "Error: {LOCAL_VERSION_FILE} no encontrado para la copia de seguridad.".format_map({"LOCAL_VERSION_FILE": LOCAL_VERSION_FILE})
+ if lang == 'fi': return "Virhe: {LOCAL_VERSION_FILE}-tiedostoa ei löytynyt varmuuskopiota varten.".format_map({"LOCAL_VERSION_FILE": LOCAL_VERSION_FILE})
+ if lang == 'fr': return "Erreur : {LOCAL_VERSION_FILE} introuvable pour la sauvegarde.".format_map({"LOCAL_VERSION_FILE": LOCAL_VERSION_FILE})
+ if lang == 'it': return "Errore: {LOCAL_VERSION_FILE} non trovato per il backup.".format_map({"LOCAL_VERSION_FILE": LOCAL_VERSION_FILE})
+ else: raise ValueError(f'Invalid language {lang}')
+def model_loaded(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Markov model loaded from**
+ - Es: **Modelo de Markov cargado desde**
+ - Fi: **Markov-malli ladattu**
+ - Fr: **Modèle Markov chargé depuis**
+ - It: **Modello Markov caricato da**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Markov model loaded from"
+ if lang == 'es': return "Modelo de Markov cargado desde"
+ if lang == 'fi': return "Markov-malli ladattu"
+ if lang == 'fr': return "Modèle Markov chargé depuis"
+ if lang == 'it': return "Modello Markov caricato da"
+ else: raise ValueError(f'Invalid language {lang}')
+def fetch_update_fail(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Could not fetch update information.**
+ - Es: **No se pudo obtener la informacion de actualizacion.**
+ - Fi: **Päivitystietojen hankkiminen epäonnistui.**
+ - Fr: **Impossible de récupérer les informations de mise à jour.**
+ - It: **Impossibile recuperare le informazioni sull'aggiornamento.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Could not fetch update information."
+ if lang == 'es': return "No se pudo obtener la informacion de actualizacion."
+ if lang == 'fi': return "Päivitystietojen hankkiminen epäonnistui."
+ if lang == 'fr': return "Impossible de récupérer les informations de mise à jour."
+ if lang == 'it': return "Impossibile recuperare le informazioni sull'aggiornamento."
+ else: raise ValueError(f'Invalid language {lang}')
+def invalid_server(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error: Invalid version information received from server.**
+ - Es: **Error: Se recibio informacion de version no valida del servidor.**
+ - Fi: **Virhe: Palvelin antoi virheellisen versiotietoraportin.**
+ - Fr: **Erreur : Informations de version invalides reçues du serveur.**
+ - It: **Errore: informazioni sulla versione non valide ricevute dal server.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error: Invalid version information received from server."
+ if lang == 'es': return "Error: Se recibio informacion de version no valida del servidor."
+ if lang == 'fi': return "Virhe: Palvelin antoi virheellisen versiotietoraportin."
+ if lang == 'fr': return "Erreur : Informations de version invalides reçues du serveur."
+ if lang == 'it': return "Errore: informazioni sulla versione non valide ricevute dal server."
+ else: raise ValueError(f'Invalid language {lang}')
+def goober_server_alert(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Alert from goober central!
+**
+ - Es: **Alert from goober central!
+**
+ - Fi: **Viesti goober centralista!
+**
+ - Fr: **Alerte du serveur Goober central !
+**
+ - It: **Avviso da goober central!
+**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Alert from goober central!\n"
+ if lang == 'es': return "Alert from goober central!\n"
+ if lang == 'fi': return "Viesti goober centralista!\n"
+ if lang == 'fr': return "Alerte du serveur Goober central !\n"
+ if lang == 'it': return "Avviso da goober central!\n"
+ else: raise ValueError(f'Invalid language {lang}')
+def new_version(latest_version,local_version,lang:str|None=None):
+ """
+ ### Locales
+ - En: **New version available: {latest_version} (Current: {local_version})**
+ - Es: **Nueva version disponible: {latest_version} (Version actual: {local_version})**
+ - Fi: **Uusi versio saatavilla: {latest_version} (Tämänhetkinen: {local_version})**
+ - Fr: **Nouvelle version disponible : {latest_version} (Actuelle : {local_version})**
+ - It: **Nuova versione disponibile: {latest_version} (Attuale: {local_version})**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "New version available: {latest_version} (Current: {local_version})".format_map({"latest_version": latest_version,"local_version": local_version})
+ if lang == 'es': return "Nueva version disponible: {latest_version} (Version actual: {local_version})".format_map({"latest_version": latest_version,"local_version": local_version})
+ if lang == 'fi': return "Uusi versio saatavilla: {latest_version} (Tämänhetkinen: {local_version})".format_map({"latest_version": latest_version,"local_version": local_version})
+ if lang == 'fr': return "Nouvelle version disponible : {latest_version} (Actuelle : {local_version})".format_map({"latest_version": latest_version,"local_version": local_version})
+ if lang == 'it': return "Nuova versione disponibile: {latest_version} (Attuale: {local_version})".format_map({"latest_version": latest_version,"local_version": local_version})
+ else: raise ValueError(f'Invalid language {lang}')
+def changelog(VERSION_URL,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Check {VERSION_URL}/goob/changes.txt to check out the changelog
+
+**
+ - Es: **Consulte {VERSION_URL}/goob/changes.txt para ver el registro de cambios
+
+**
+ - Fi: **Mene osoitteeseen {VERSION_URL}/goob/changes.txt katsotakseen muutoslokin
+
+**
+ - Fr: **Consultez {VERSION_URL}/goob/changes.txt pour voir les modifications
+
+**
+ - It: **Controlla {VERSION_URL}/goob/changes.txt per vedere il changelog
+
+**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Check {VERSION_URL}/goob/changes.txt to check out the changelog\n\n".format_map({"VERSION_URL": VERSION_URL})
+ if lang == 'es': return "Consulte {VERSION_URL}/goob/changes.txt para ver el registro de cambios\n\n".format_map({"VERSION_URL": VERSION_URL})
+ if lang == 'fi': return "Mene osoitteeseen {VERSION_URL}/goob/changes.txt katsotakseen muutoslokin\n\n".format_map({"VERSION_URL": VERSION_URL})
+ if lang == 'fr': return "Consultez {VERSION_URL}/goob/changes.txt pour voir les modifications\n\n".format_map({"VERSION_URL": VERSION_URL})
+ if lang == 'it': return "Controlla {VERSION_URL}/goob/changes.txt per vedere il changelog\n\n".format_map({"VERSION_URL": VERSION_URL})
+ else: raise ValueError(f'Invalid language {lang}')
+def invalid_version(local_version,lang:str|None=None):
+ """
+ ### Locales
+ - En: **The version: {local_version} isnt valid!**
+ - Es: **La version: {local_version} no es valida!**
+ - Fi: **Versio: {local_version} on virheellinen!**
+ - Fr: **La version : {local_version} n'est pas valide !**
+ - It: **La versione: {local_version} non è valida!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "The version: {local_version} isnt valid!".format_map({"local_version": local_version})
+ if lang == 'es': return "La version: {local_version} no es valida!".format_map({"local_version": local_version})
+ if lang == 'fi': return "Versio: {local_version} on virheellinen!".format_map({"local_version": local_version})
+ if lang == 'fr': return "La version : {local_version} n'est pas valide !".format_map({"local_version": local_version})
+ if lang == 'it': return "La versione: {local_version} non è valida!".format_map({"local_version": local_version})
+ else: raise ValueError(f'Invalid language {lang}')
+def invalid_version2(lang:str|None=None):
+ """
+ ### Locales
+ - En: **If this is intended then ignore this message, else press Y to pull a valid version from the server regardless of the version of goober currently running**
+ - Es: **Si esto es lo que pretende, ignore este mensaje; si no, haga clic en Y en su teclado para descargar una version valida del servidor, independientemente de la version que se este ejecutando actualmente.**
+ - Fi: **Jos tämä on tahallista, voit jättää tämän viestin huomiotta. Jos tämä ei ole tahallista, paina Y-näppäintä hankkiaksesi kelvollisen version, riippumatta Gooberin tämänhetkisestä versiosta.**
+ - Fr: **Si c'est intentionnel, ignorez ce message. Sinon, appuyez sur Y pour récupérer une version valide depuis le serveur, quelle que soit la version actuelle de Goober.**
+ - It: **Se è intenzionale ignora questo messaggio, altrimenti premi Y per scaricare una versione valida dal server indipendentemente dalla versione attuale di goober**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "If this is intended then ignore this message, else press Y to pull a valid version from the server regardless of the version of goober currently running"
+ if lang == 'es': return "Si esto es lo que pretende, ignore este mensaje; si no, haga clic en Y en su teclado para descargar una version valida del servidor, independientemente de la version que se este ejecutando actualmente."
+ if lang == 'fi': return "Jos tämä on tahallista, voit jättää tämän viestin huomiotta. Jos tämä ei ole tahallista, paina Y-näppäintä hankkiaksesi kelvollisen version, riippumatta Gooberin tämänhetkisestä versiosta."
+ if lang == 'fr': return "Si c'est intentionnel, ignorez ce message. Sinon, appuyez sur Y pour récupérer une version valide depuis le serveur, quelle que soit la version actuelle de Goober."
+ if lang == 'it': return "Se è intenzionale ignora questo messaggio, altrimenti premi Y per scaricare una versione valida dal server indipendentemente dalla versione attuale di goober"
+ else: raise ValueError(f'Invalid language {lang}')
+def invalid_version3(lang:str|None=None):
+ """
+ ### Locales
+ - En: **The current version will be backed up to current_version.bak..**
+ - Es: **La version actual se copiara a current_version.bak..**
+ - Fi: **Tämänhetkinen versio varmuuskopioidaan kohteeseen current_version.bak..**
+ - Fr: **La version actuelle sera sauvegardée dans current_version.bak..**
+ - It: **La versione attuale sarà salvata come current_version.bak..**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "The current version will be backed up to current_version.bak.."
+ if lang == 'es': return "La version actual se copiara a current_version.bak.."
+ if lang == 'fi': return "Tämänhetkinen versio varmuuskopioidaan kohteeseen current_version.bak.."
+ if lang == 'fr': return "La version actuelle sera sauvegardée dans current_version.bak.."
+ if lang == 'it': return "La versione attuale sarà salvata come current_version.bak.."
+ else: raise ValueError(f'Invalid language {lang}')
+def input(lang:str|None=None):
+ """
+ ### Locales
+ - En: **(Y or any other key to ignore....)**
+ - Es: **(Y o cualquier otra tecla para ignorar....)**
+ - Fi: **(Y:tä tai mitä vaan muuta näppäintä jättää tämän huomioimatta....)**
+ - Fr: **(Y ou toute autre touche pour ignorer...)**
+ - It: **(Y o qualsiasi altro tasto per ignorare....)**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "(Y or any other key to ignore....)"
+ if lang == 'es': return "(Y o cualquier otra tecla para ignorar....)"
+ if lang == 'fi': return "(Y:tä tai mitä vaan muuta näppäintä jättää tämän huomioimatta....)"
+ if lang == 'fr': return "(Y ou toute autre touche pour ignorer...)"
+ if lang == 'it': return "(Y o qualsiasi altro tasto per ignorare....)"
+ else: raise ValueError(f'Invalid language {lang}')
+def modification_ignored(lang:str|None=None):
+ """
+ ### Locales
+ - En: **You've modified**
+ - Es: **Has modificado**
+ - Fi: **Olet muokannut**
+ - Fr: **Vous avez modifié**
+ - It: **Hai modificato**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "You've modified"
+ if lang == 'es': return "Has modificado"
+ if lang == 'fi': return "Olet muokannut"
+ if lang == 'fr': return "Vous avez modifié"
+ if lang == 'it': return "Hai modificato"
+ else: raise ValueError(f'Invalid language {lang}')
+def modification_ignored2(lang:str|None=None):
+ """
+ ### Locales
+ - En: **IGNOREWARNING is set to false..**
+ - Es: **IGNOREWARNING es falso**
+ - Fi: **IGNOREWARNING on asetettu false:ksi..**
+ - Fr: **IGNOREWARNING est désactivé..**
+ - It: **IGNOREWARNING è impostato su false..**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "IGNOREWARNING is set to false.."
+ if lang == 'es': return "IGNOREWARNING es falso"
+ if lang == 'fi': return "IGNOREWARNING on asetettu false:ksi.."
+ if lang == 'fr': return "IGNOREWARNING est désactivé.."
+ if lang == 'it': return "IGNOREWARNING è impostato su false.."
+ else: raise ValueError(f'Invalid language {lang}')
+def latest_version(lang:str|None=None):
+ """
+ ### Locales
+ - En: **You're using the latest version:**
+ - Es: **Usando la ultima version:**
+ - Fi: **Käytät uusinta versiota:**
+ - Fr: **Vous utilisez la dernière version :**
+ - It: **Stai utilizzando l'ultima versione:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "You're using the latest version:"
+ if lang == 'es': return "Usando la ultima version:"
+ if lang == 'fi': return "Käytät uusinta versiota:"
+ if lang == 'fr': return "Vous utilisez la dernière version :"
+ if lang == 'it': return "Stai utilizzando l'ultima versione:"
+ else: raise ValueError(f'Invalid language {lang}')
+def latest_version2(VERSION_URL,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Check {VERSION_URL}/goob/changes.txt to check out the changelog**
+ - Es: **Consulte {VERSION_URL}/goob/changes.txt para ver el registro de cambios**
+ - Fi: **Tarkista {VERSION_URL}/goob/changes.txt katsotakseen muutosloki**
+ - Fr: **Consultez {VERSION_URL}/goob/changes.txt pour voir les modifications**
+ - It: **Controlla {VERSION_URL}/goob/changes.txt per vedere il changelog**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Check {VERSION_URL}/goob/changes.txt to check out the changelog".format_map({"VERSION_URL": VERSION_URL})
+ if lang == 'es': return "Consulte {VERSION_URL}/goob/changes.txt para ver el registro de cambios".format_map({"VERSION_URL": VERSION_URL})
+ if lang == 'fi': return "Tarkista {VERSION_URL}/goob/changes.txt katsotakseen muutosloki".format_map({"VERSION_URL": VERSION_URL})
+ if lang == 'fr': return "Consultez {VERSION_URL}/goob/changes.txt pour voir les modifications".format_map({"VERSION_URL": VERSION_URL})
+ if lang == 'it': return "Controlla {VERSION_URL}/goob/changes.txt per vedere il changelog".format_map({"VERSION_URL": VERSION_URL})
+ else: raise ValueError(f'Invalid language {lang}')
+def pinging_disabled(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Pinging is disabled! Not telling the server im on...**
+ - Es: **El ping esta deshabilitado**
+ - Fi: **Pingaus on poistettu käytöstä! En kerro palvelimelle, että olen päällä...**
+ - Fr: **Le ping est désactivé ! Je ne préviens pas le serveur que je suis en ligne...**
+ - It: **Il ping è disabilitato! Non dico al server che sono online...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Pinging is disabled! Not telling the server im on..."
+ if lang == 'es': return "El ping esta deshabilitado"
+ if lang == 'fi': return "Pingaus on poistettu käytöstä! En kerro palvelimelle, että olen päällä..."
+ if lang == 'fr': return "Le ping est désactivé ! Je ne préviens pas le serveur que je suis en ligne..."
+ if lang == 'it': return "Il ping è disabilitato! Non dico al server che sono online..."
+ else: raise ValueError(f'Invalid language {lang}')
+def goober_ping_success(NAME,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Logged into goober central as {NAME}**
+ - Es: **Envie ping a Goober Central!**
+ - Fi: **Lähetettiin olemassaolo ping goober centraliin!**
+ - Fr: **Connecté à Goober central en tant que {NAME}**
+ - It: **Accesso a goober central come {NAME}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Logged into goober central as {NAME}".format_map({"NAME": NAME})
+ if lang == 'es': return "Envie ping a Goober Central!".format_map({"NAME": NAME})
+ if lang == 'fi': return "Lähetettiin olemassaolo ping goober centraliin!".format_map({"NAME": NAME})
+ if lang == 'fr': return "Connecté à Goober central en tant que {NAME}".format_map({"NAME": NAME})
+ if lang == 'it': return "Accesso a goober central come {NAME}".format_map({"NAME": NAME})
+ else: raise ValueError(f'Invalid language {lang}')
+def goober_ping_fail(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Failed to send data. Server returned status code:**
+ - Es: **Error al enviar datos. El servidor devolvio el codigo de estado:**
+ - Fi: **Tiedon lähetys epäonnistui. Palvelin antoi tilakoodin:**
+ - Fr: **Échec de l'envoi des données. Le serveur a retourné le code d'état :**
+ - It: **Impossibile inviare i dati. Il server ha restituito il codice di stato:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Failed to send data. Server returned status code:"
+ if lang == 'es': return "Error al enviar datos. El servidor devolvio el codigo de estado:"
+ if lang == 'fi': return "Tiedon lähetys epäonnistui. Palvelin antoi tilakoodin:"
+ if lang == 'fr': return "Échec de l'envoi des données. Le serveur a retourné le code d'état :"
+ if lang == 'it': return "Impossibile inviare i dati. Il server ha restituito il codice di stato:"
+ else: raise ValueError(f'Invalid language {lang}')
+def goober_ping_fail2(lang:str|None=None):
+ """
+ ### Locales
+ - En: **An error occurred while sending data:**
+ - Es: **Se produjo un error al enviar los datos:**
+ - Fi: **Tiedon lähettämisen aikana tapahtui virhe:**
+ - Fr: **Une erreur est survenue lors de l'envoi des données :**
+ - It: **Si è verificato un errore durante l'invio dei dati:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "An error occurred while sending data:"
+ if lang == 'es': return "Se produjo un error al enviar los datos:"
+ if lang == 'fi': return "Tiedon lähettämisen aikana tapahtui virhe:"
+ if lang == 'fr': return "Une erreur est survenue lors de l'envoi des données :"
+ if lang == 'it': return "Si è verificato un errore durante l'invio dei dati:"
+ else: raise ValueError(f'Invalid language {lang}')
+def sentence_positivity(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Positivity of sentence is:**
+ - Es: **La positividad de la sentencia es:**
+ - Fi: **Lauseen positiivisuus on:**
+ - Fr: **La positivité de la phrase est :**
+ - It: **La positività della frase è:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Positivity of sentence is:"
+ if lang == 'es': return "La positividad de la sentencia es:"
+ if lang == 'fi': return "Lauseen positiivisuus on:"
+ if lang == 'fr': return "La positivité de la phrase est :"
+ if lang == 'it': return "La positività della frase è:"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_edit_fail(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Failed to edit message:**
+ - Es: **No se pudo editar el mensaje:**
+ - Fi: **Viestin muokkaus epäonnistui:**
+ - Fr: **Échec de la modification du message :**
+ - It: **Impossibile modificare il messaggio:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Failed to edit message:"
+ if lang == 'es': return "No se pudo editar el mensaje:"
+ if lang == 'fi': return "Viestin muokkaus epäonnistui:"
+ if lang == 'fr': return "Échec de la modification du message :"
+ if lang == 'it': return "Impossibile modificare il messaggio:"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_desc_retrain(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Retrains the Markov model manually.**
+ - Es: **Vuelve a entrenar el modelo de Markov manualmente.**
+ - Fi: **Uudelleenkouluttaa markov-mallin manuaalisesti.**
+ - Fr: **Réentraîne manuellement le modèle Markov.**
+ - It: **Rafforza manualmente il modello Markov.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Retrains the Markov model manually."
+ if lang == 'es': return "Vuelve a entrenar el modelo de Markov manualmente."
+ if lang == 'fi': return "Uudelleenkouluttaa markov-mallin manuaalisesti."
+ if lang == 'fr': return "Réentraîne manuellement le modèle Markov."
+ if lang == 'it': return "Rafforza manualmente il modello Markov."
+ else: raise ValueError(f'Invalid language {lang}')
+def command_markov_retrain(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Retraining the Markov model... Please wait.**
+ - Es: **Reentrenando el modelo de Markov... Por favor espere**
+ - Fi: **Uudelleenkoulutetaan markov-mallia... Odota.**
+ - Fr: **Réentraînement du modèle Markov... Veuillez patienter.**
+ - It: **Rafforzamento del modello Markov in corso... Attendere.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Retraining the Markov model... Please wait."
+ if lang == 'es': return "Reentrenando el modelo de Markov... Por favor espere"
+ if lang == 'fi': return "Uudelleenkoulutetaan markov-mallia... Odota."
+ if lang == 'fr': return "Réentraînement du modèle Markov... Veuillez patienter."
+ if lang == 'it': return "Rafforzamento del modello Markov in corso... Attendere."
+ else: raise ValueError(f'Invalid language {lang}')
+def command_markov_memory_not_found(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error: memory file not found!**
+ - Es: **Error: no hay archivo de memoria!**
+ - Fi: **Virhe: muistitiedostoa ei löytynyt!**
+ - Fr: **Erreur : fichier de mémoire introuvable !**
+ - It: **Errore: file di memoria non trovato!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error: memory file not found!"
+ if lang == 'es': return "Error: no hay archivo de memoria!"
+ if lang == 'fi': return "Virhe: muistitiedostoa ei löytynyt!"
+ if lang == 'fr': return "Erreur : fichier de mémoire introuvable !"
+ if lang == 'it': return "Errore: file di memoria non trovato!"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_markov_memory_is_corrupt(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Error: memory file is corrupt!**
+ - Es: **Error: el archivo de memoria esta danado!**
+ - Fi: **Virhe: muistitiedosto on korruptoitu!**
+ - Fr: **Erreur : le fichier de mémoire est corrompu !**
+ - It: **Errore: file di memoria corrotto!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Error: memory file is corrupt!"
+ if lang == 'es': return "Error: el archivo de memoria esta danado!"
+ if lang == 'fi': return "Virhe: muistitiedosto on korruptoitu!"
+ if lang == 'fr': return "Erreur : le fichier de mémoire est corrompu !"
+ if lang == 'it': return "Errore: file di memoria corrotto!"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_markov_retraining(data_size,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Processing {data_size} data points...**
+ - Es: **Procesando {processed_data}/{data_size} puntos de datos...**
+ - Fi: **Käsitellään {processed_data}/{data_size} datapistettä...**
+ - Fr: **Traitement de {processed_data}/{data_size} points de données...**
+ - It: **Elaborazione di {data_size} punti dati...**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Processing {data_size} data points...".format_map({"data_size": data_size})
+ if lang == 'es': return "Procesando {processed_data}/{data_size} puntos de datos...".format_map({"data_size": data_size})
+ if lang == 'fi': return "Käsitellään {processed_data}/{data_size} datapistettä...".format_map({"data_size": data_size})
+ if lang == 'fr': return "Traitement de {processed_data}/{data_size} points de données...".format_map({"data_size": data_size})
+ if lang == 'it': return "Elaborazione di {data_size} punti dati...".format_map({"data_size": data_size})
+ else: raise ValueError(f'Invalid language {lang}')
+def command_markov_retrain_successful(data_size,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Markov model retrained successfully using {data_size} data points!**
+ - Es: **Modelo de Markov reentrenado exitosamente usando {data_size} puntos de datos!**
+ - Fi: **Markov-malli koulutettiin uudestaan {data_size} datapisteellä!**
+ - Fr: **Modèle Markov réentraîné avec succès en utilisant {data_size} points de données !**
+ - It: **Modello Markov rafforzato con successo utilizzando {data_size} punti dati!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Markov model retrained successfully using {data_size} data points!".format_map({"data_size": data_size})
+ if lang == 'es': return "Modelo de Markov reentrenado exitosamente usando {data_size} puntos de datos!".format_map({"data_size": data_size})
+ if lang == 'fi': return "Markov-malli koulutettiin uudestaan {data_size} datapisteellä!".format_map({"data_size": data_size})
+ if lang == 'fr': return "Modèle Markov réentraîné avec succès en utilisant {data_size} points de données !".format_map({"data_size": data_size})
+ if lang == 'it': return "Modello Markov rafforzato con successo utilizzando {data_size} punti dati!".format_map({"data_size": data_size})
+ else: raise ValueError(f'Invalid language {lang}')
+def command_desc_talk(lang:str|None=None):
+ """
+ ### Locales
+ - En: **talks n like stuf**
+ - Es: **hace que el bot hable**
+ - Fi: **puhuu ja sillei**
+ - Fr: **parle et tout ça**
+ - It: **parla n come stuf**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "talks n like stuf"
+ if lang == 'es': return "hace que el bot hable"
+ if lang == 'fi': return "puhuu ja sillei"
+ if lang == 'fr': return "parle et tout ça"
+ if lang == 'it': return "parla n come stuf"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_talk_insufficent_text(lang:str|None=None):
+ """
+ ### Locales
+ - En: **I need to learn more from messages before I can talk.**
+ - Es: **Necesito aprender más sobre los mensajes antes de hablar.**
+ - Fi: **Minun pitää oppia lisää viesteistä ennen kun puhun.**
+ - Fr: **Je dois apprendre plus de messages avant de pouvoir parler.**
+ - It: **Ho bisogno di imparare di più dai messaggi prima di poter parlare.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "I need to learn more from messages before I can talk."
+ if lang == 'es': return "Necesito aprender más sobre los mensajes antes de hablar."
+ if lang == 'fi': return "Minun pitää oppia lisää viesteistä ennen kun puhun."
+ if lang == 'fr': return "Je dois apprendre plus de messages avant de pouvoir parler."
+ if lang == 'it': return "Ho bisogno di imparare di più dai messaggi prima di poter parlare."
+ else: raise ValueError(f'Invalid language {lang}')
+def command_talk_generation_fail(lang:str|None=None):
+ """
+ ### Locales
+ - En: **I have nothing to say right now!**
+ - Es: **No tengo nada que decir ahora!**
+ - Fi: **Minulla ei ole mitään sanottavaa!**
+ - Fr: **Je n'ai rien à dire pour le moment !**
+ - It: **Non ho nulla da dire in questo momento!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "I have nothing to say right now!"
+ if lang == 'es': return "No tengo nada que decir ahora!"
+ if lang == 'fi': return "Minulla ei ole mitään sanottavaa!"
+ if lang == 'fr': return "Je n'ai rien à dire pour le moment !"
+ if lang == 'it': return "Non ho nulla da dire in questo momento!"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_desc_help(lang:str|None=None):
+ """
+ ### Locales
+ - En: **help**
+ - Es: **Ayuda**
+ - Fi: **auta**
+ - Fr: **aide**
+ - It: **aiuto**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "help"
+ if lang == 'es': return "Ayuda"
+ if lang == 'fi': return "auta"
+ if lang == 'fr': return "aide"
+ if lang == 'it': return "aiuto"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_help_embed_title(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Bot Help**
+ - Es: **Ayuda del bot**
+ - Fi: **Botin apu**
+ - Fr: **Aide du bot**
+ - It: **Aiuto Bot**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Bot Help"
+ if lang == 'es': return "Ayuda del bot"
+ if lang == 'fi': return "Botin apu"
+ if lang == 'fr': return "Aide du bot"
+ if lang == 'it': return "Aiuto Bot"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_help_embed_desc(lang:str|None=None):
+ """
+ ### Locales
+ - En: **List of commands grouped by category.**
+ - Es: **Lista de comandos agrupados por categoria**
+ - Fi: **Komennot ryhmitelty kategorioilla**
+ - Fr: **Liste des commandes regroupées par catégorie.**
+ - It: **Elenco dei comandi raggruppati per categoria.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "List of commands grouped by category."
+ if lang == 'es': return "Lista de comandos agrupados por categoria"
+ if lang == 'fi': return "Komennot ryhmitelty kategorioilla"
+ if lang == 'fr': return "Liste des commandes regroupées par catégorie."
+ if lang == 'it': return "Elenco dei comandi raggruppati per categoria."
+ else: raise ValueError(f'Invalid language {lang}')
+def command_help_categories_general(lang:str|None=None):
+ """
+ ### Locales
+ - En: **General**
+ - Es: **General**
+ - Fi: **Yleiset**
+ - Fr: **Général**
+ - It: **Generale**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "General"
+ if lang == 'es': return "General"
+ if lang == 'fi': return "Yleiset"
+ if lang == 'fr': return "Général"
+ if lang == 'it': return "Generale"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_help_categories_admin(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Administration**
+ - Es: **Administracion**
+ - Fi: **Ylläpito**
+ - Fr: **Administration**
+ - It: **Amministrazione**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Administration"
+ if lang == 'es': return "Administracion"
+ if lang == 'fi': return "Ylläpito"
+ if lang == 'fr': return "Administration"
+ if lang == 'it': return "Amministrazione"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_help_categories_custom(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Custom Commands**
+ - Es: **Comandos personalizados**
+ - Fi: **Mukautetut komennot**
+ - Fr: **Commandes personnalisées**
+ - It: **Comandi personalizzati**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Custom Commands"
+ if lang == 'es': return "Comandos personalizados"
+ if lang == 'fi': return "Mukautetut komennot"
+ if lang == 'fr': return "Commandes personnalisées"
+ if lang == 'it': return "Comandi personalizzati"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_ran(message_author_name,message_content,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Info: {message.author.name} ran {message.content}**
+ - Es: **Informacion: {message.author.name} ejecuto {message.content}**
+ - Fi: **Tietoa: {message.author.name} suoritti {message.content}**
+ - Fr: **Info : {message.author.name} a exécuté {message.content}**
+ - It: **Info: {message.author.name} ha eseguito {message.content}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Info: {message_author_name} ran {message_content}".format_map({"message_author_name": message_author_name,"message_content": message_content})
+ if lang == 'es': return "Informacion: {message_author_name} ejecuto {message_content}".format_map({"message_author_name": message_author_name,"message_content": message_content})
+ if lang == 'fi': return "Tietoa: {message_author_name} suoritti {message_content}".format_map({"message_author_name": message_author_name,"message_content": message_content})
+ if lang == 'fr': return "Info : {message_author_name} a exécuté {message_content}".format_map({"message_author_name": message_author_name,"message_content": message_content})
+ if lang == 'it': return "Info: {message_author_name} ha eseguito {message_content}".format_map({"message_author_name": message_author_name,"message_content": message_content})
+ else: raise ValueError(f'Invalid language {lang}')
+def command_ran_s(interaction_user,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Info: {interaction.user} ran **
+ - Es: **Info: {interaction.user} ran **
+ - Fi: **Info: {interaction.user} suoritti**
+ - Fr: **Info : {interaction.user} a exécuté **
+ - It: **Info: {interaction.user} ha eseguito **
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Info: {interaction_user} ran ".format_map({"interaction_user": interaction_user})
+ if lang == 'es': return "Info: {interaction_user} ran ".format_map({"interaction_user": interaction_user})
+ if lang == 'fi': return "Info: {interaction_user} suoritti".format_map({"interaction_user": interaction_user})
+ if lang == 'fr': return "Info : {interaction_user} a exécuté ".format_map({"interaction_user": interaction_user})
+ if lang == 'it': return "Info: {interaction_user} ha eseguito ".format_map({"interaction_user": interaction_user})
+ else: raise ValueError(f'Invalid language {lang}')
+def command_desc_ping(lang:str|None=None):
+ """
+ ### Locales
+ - En: **ping**
+ - Es: **ping**
+ - Fi: **ping**
+ - Fr: **ping**
+ - It: **ping**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "ping"
+ if lang == 'es': return "ping"
+ if lang == 'fi': return "ping"
+ if lang == 'fr': return "ping"
+ if lang == 'it': return "ping"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_desc_setlang(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Set a new language for the bot (temporarily)**
+ - Es: **Set a new language for the bot (temporarily)**
+ - Fi: **Set a new language for the bot (temporarily)**
+ - Fr: **Set a new language for the bot (temporarily)**
+ - It: **Imposta una nuova lingua per il bot (temporaneamente)**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Set a new language for the bot (temporarily)"
+ if lang == 'es': return "Set a new language for the bot (temporarily)"
+ if lang == 'fi': return "Set a new language for the bot (temporarily)"
+ if lang == 'fr': return "Set a new language for the bot (temporarily)"
+ if lang == 'it': return "Imposta una nuova lingua per il bot (temporaneamente)"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_ping_embed_desc(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Bot Latency:**
+ - Es: **Latencia del bot:**
+ - Fi: **Botin viive:**
+ - Fr: **Latence du bot :**
+ - It: **Latenza del bot:**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Bot Latency:"
+ if lang == 'es': return "Latencia del bot:"
+ if lang == 'fi': return "Botin viive:"
+ if lang == 'fr': return "Latence du bot :"
+ if lang == 'it': return "Latenza del bot:"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_ping_footer(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Requested by**
+ - Es: **Solicitado por**
+ - Fi: **Pyytäjä: **
+ - Fr: **Demandé par**
+ - It: **Richiesto da**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Requested by"
+ if lang == 'es': return "Solicitado por"
+ if lang == 'fi': return "Pyytäjä: "
+ if lang == 'fr': return "Demandé par"
+ if lang == 'it': return "Richiesto da"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_about_desc(lang:str|None=None):
+ """
+ ### Locales
+ - En: **about**
+ - Es: **Acerca**
+ - Fi: **tietoa**
+ - Fr: **à propos**
+ - It: **informazioni**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "about"
+ if lang == 'es': return "Acerca"
+ if lang == 'fi': return "tietoa"
+ if lang == 'fr': return "à propos"
+ if lang == 'it': return "informazioni"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_about_embed_title(lang:str|None=None):
+ """
+ ### Locales
+ - En: **About me**
+ - Es: **Acerca de mi**
+ - Fi: **Tietoa minusta**
+ - Fr: **À propos de moi**
+ - It: **Informazioni su di me**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "About me"
+ if lang == 'es': return "Acerca de mi"
+ if lang == 'fi': return "Tietoa minusta"
+ if lang == 'fr': return "À propos de moi"
+ if lang == 'it': return "Informazioni su di me"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_about_embed_field1(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Name**
+ - Es: **Nombre**
+ - Fi: **Nimi**
+ - Fr: **Nom**
+ - It: **Nome**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Name"
+ if lang == 'es': return "Nombre"
+ if lang == 'fi': return "Nimi"
+ if lang == 'fr': return "Nom"
+ if lang == 'it': return "Nome"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_about_embed_field2name(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Version**
+ - Es: **Version**
+ - Fi: **Versio**
+ - Fr: **Version**
+ - It: **Versione**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Version"
+ if lang == 'es': return "Version"
+ if lang == 'fi': return "Versio"
+ if lang == 'fr': return "Version"
+ if lang == 'it': return "Versione"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_about_embed_field2value(local_version,latest_version,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Local: {local_version}
+Latest: {latest_version}**
+ - Es: **Version local: {local_version}
+Ultima version: {latest_version}**
+ - Fi: **Paikallinen: {local_version}
+Uusin: {latest_version}**
+ - Fr: **Locale : {local_version}
+Dernière : {latest_version}**
+ - It: **Locale: {local_version}
+Ultima: {latest_version}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Local: {local_version} \nLatest: {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ if lang == 'es': return "Version local: {local_version} \nUltima version: {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ if lang == 'fi': return "Paikallinen: {local_version} \nUusin: {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ if lang == 'fr': return "Locale : {local_version} \nDernière : {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ if lang == 'it': return "Locale: {local_version} \nUltima: {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ else: raise ValueError(f'Invalid language {lang}')
+def command_desc_stats(lang:str|None=None):
+ """
+ ### Locales
+ - En: **stats**
+ - Es: **Estadistica**
+ - Fi: **statistiikat**
+ - Fr: **statistiques**
+ - It: **statistiche**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "stats"
+ if lang == 'es': return "Estadistica"
+ if lang == 'fi': return "statistiikat"
+ if lang == 'fr': return "statistiques"
+ if lang == 'it': return "statistiche"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_stats_embed_title(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Bot stats**
+ - Es: **Estadisticas de bot**
+ - Fi: **Botin statistiikat**
+ - Fr: **Statistiques du bot**
+ - It: **Statistiche del bot**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Bot stats"
+ if lang == 'es': return "Estadisticas de bot"
+ if lang == 'fi': return "Botin statistiikat"
+ if lang == 'fr': return "Statistiques du bot"
+ if lang == 'it': return "Statistiche del bot"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_stats_embed_desc(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Data about the the bot's memory.**
+ - Es: **Datos sobre la memoria del bot**
+ - Fi: **Tietoa botin muistista.**
+ - Fr: **Données sur la mémoire du bot.**
+ - It: **Dati sulla memoria del bot.**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Data about the the bot's memory."
+ if lang == 'es': return "Datos sobre la memoria del bot"
+ if lang == 'fi': return "Tietoa botin muistista."
+ if lang == 'fr': return "Données sur la mémoire du bot."
+ if lang == 'it': return "Dati sulla memoria del bot."
+ else: raise ValueError(f'Invalid language {lang}')
+def command_stats_embed_field1name(lang:str|None=None):
+ """
+ ### Locales
+ - En: **File Stats**
+ - Es: **Estadisticas**
+ - Fi: **Tiedostostatistiikat**
+ - Fr: **Statistiques du fichier**
+ - It: **Statistiche del file**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "File Stats"
+ if lang == 'es': return "Estadisticas"
+ if lang == 'fi': return "Tiedostostatistiikat"
+ if lang == 'fr': return "Statistiques du fichier"
+ if lang == 'it': return "Statistiche del file"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_stats_embed_field1value(file_size,line_count,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Size: {file_size} bytes
+Lines: {line_count}**
+ - Es: **Tamano: {file_size} bytes
+Lineas: {line_count}**
+ - Fi: **Koko: {file_size} tavua
+Linjoja: {line_count}**
+ - Fr: **Taille : {file_size} octets
+Lignes : {line_count}**
+ - It: **Dimensione: {file_size} byte
+Linee: {line_count}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Size: {file_size} bytes\nLines: {line_count}".format_map({"file_size": file_size,"line_count": line_count})
+ if lang == 'es': return "Tamano: {file_size} bytes\nLineas: {line_count}".format_map({"file_size": file_size,"line_count": line_count})
+ if lang == 'fi': return "Koko: {file_size} tavua\nLinjoja: {line_count}".format_map({"file_size": file_size,"line_count": line_count})
+ if lang == 'fr': return "Taille : {file_size} octets\nLignes : {line_count}".format_map({"file_size": file_size,"line_count": line_count})
+ if lang == 'it': return "Dimensione: {file_size} byte\nLinee: {line_count}".format_map({"file_size": file_size,"line_count": line_count})
+ else: raise ValueError(f'Invalid language {lang}')
+def command_stats_embed_field2name(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Version**
+ - Es: **Version**
+ - Fi: **Versio**
+ - Fr: **Version**
+ - It: **Versione**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Version"
+ if lang == 'es': return "Version"
+ if lang == 'fi': return "Versio"
+ if lang == 'fr': return "Version"
+ if lang == 'it': return "Versione"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_stats_embed_field2value(local_version,latest_version,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Local: {local_version}
+Latest: {latest_version}**
+ - Es: **Version local: {local_version}
+Ultima version: {latest_version}**
+ - Fi: **Paikallinen: {local_version}
+Uusin: {latest_version}**
+ - Fr: **Locale : {local_version}
+Dernière : {latest_version}**
+ - It: **Locale: {local_version}
+Ultima: {latest_version}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Local: {local_version} \nLatest: {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ if lang == 'es': return "Version local: {local_version} \nUltima version: {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ if lang == 'fi': return "Paikallinen: {local_version} \nUusin: {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ if lang == 'fr': return "Locale : {local_version} \nDernière : {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ if lang == 'it': return "Locale: {local_version} \nUltima: {latest_version}".format_map({"local_version": local_version,"latest_version": latest_version})
+ else: raise ValueError(f'Invalid language {lang}')
+def command_stats_embed_field3name(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Variable Info**
+ - Es: **informacion sobre las variables**
+ - Fi: **Muuttajainformaatio**
+ - Fr: **Informations variables**
+ - It: **Informazioni sulle variabili**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Variable Info"
+ if lang == 'es': return "informacion sobre las variables"
+ if lang == 'fi': return "Muuttajainformaatio"
+ if lang == 'fr': return "Informations variables"
+ if lang == 'it': return "Informazioni sulle variabili"
+ else: raise ValueError(f'Invalid language {lang}')
+def command_stats_embed_field3value(NAME,PREFIX,ownerid,PING_LINE,showmemenabled,USERTRAIN_ENABLED,song,splashtext,lang:str|None=None):
+ """
+ ### Locales
+ - En: **Name: {NAME}
+Prefix: {PREFIX}
+Owner ID: {ownerid}
+Ping line: {PING_LINE}
+Memory Sharing Enabled: {showmemenabled}
+User Training Enabled: {USERTRAIN_ENABLED}
+Song: {song}
+Splashtext: ```{splashtext}```**
+ - Es: **Nombre: {NAME}
+Prefijo: {PREFIX}
+ID del propietario: {ownerid}
+Linea de ping: {PING_LINE}
+Compartir memoria habilitada: {showmemenabled}
+Entrenamiento de usuario habilitado: {USERTRAIN_ENABLED}
+Cancion: {song}
+Texto de bienvenida: ```{splashtext}```**
+ - Fi: **Nimi: {NAME}
+Etuliite: {PREFIX}
+Omistajan ID: {ownerid}
+Ping-linja: {PING_LINE}
+Muistin jako päällä: {showmemenabled}
+Oppiminen käyttäjistä: {USERTRAIN_ENABLED}
+Laulu: {song}
+Roisketeksti: ```{splashtext}```**
+ - Fr: **Nom : {NAME}
+Préfixe : {PREFIX}
+ID du propriétaire : {ownerid}
+Ligne de ping : {PING_LINE}
+Partage de mémoire activé : {showmemenabled}
+Entraînement utilisateur activé : {USERTRAIN_ENABLED}
+Chanson : {song}
+Texte de démarrage : ```{splashtext}```**
+ - It: **Nome: {NAME}
+Prefisso: {PREFIX}
+ID Proprietario: {ownerid}
+Linea ping: {PING_LINE}
+Memoria Condivisa Abilitata: {showmemenabled}
+Addestramento Utente Abilitato: {USERTRAIN_ENABLED}
+Canzone: {song}
+Splashtext: ```{splashtext}```**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Name: {NAME} \nPrefix: {PREFIX} \nOwner ID: {ownerid}\nPing line: {PING_LINE} \nMemory Sharing Enabled: {showmemenabled} \nUser Training Enabled: {USERTRAIN_ENABLED}\nSong: {song} \nSplashtext: ```{splashtext}```".format_map({"NAME": NAME,"PREFIX": PREFIX,"ownerid": ownerid,"PING_LINE": PING_LINE,"showmemenabled": showmemenabled,"USERTRAIN_ENABLED": USERTRAIN_ENABLED,"song": song,"splashtext": splashtext})
+ if lang == 'es': return "Nombre: {NAME} \nPrefijo: {PREFIX} \nID del propietario: {ownerid}\nLinea de ping: {PING_LINE} \nCompartir memoria habilitada: {showmemenabled} \nEntrenamiento de usuario habilitado: {USERTRAIN_ENABLED} \nCancion: {song} \nTexto de bienvenida: ```{splashtext}```".format_map({"NAME": NAME,"PREFIX": PREFIX,"ownerid": ownerid,"PING_LINE": PING_LINE,"showmemenabled": showmemenabled,"USERTRAIN_ENABLED": USERTRAIN_ENABLED,"song": song,"splashtext": splashtext})
+ if lang == 'fi': return "Nimi: {NAME} \nEtuliite: {PREFIX} \nOmistajan ID: {ownerid}\nPing-linja: {PING_LINE} \nMuistin jako päällä: {showmemenabled} \nOppiminen käyttäjistä: {USERTRAIN_ENABLED}\nLaulu: {song} \nRoisketeksti: ```{splashtext}```".format_map({"NAME": NAME,"PREFIX": PREFIX,"ownerid": ownerid,"PING_LINE": PING_LINE,"showmemenabled": showmemenabled,"USERTRAIN_ENABLED": USERTRAIN_ENABLED,"song": song,"splashtext": splashtext})
+ if lang == 'fr': return "Nom : {NAME} \nPréfixe : {PREFIX} \nID du propriétaire : {ownerid}\nLigne de ping : {PING_LINE} \nPartage de mémoire activé : {showmemenabled} \nEntraînement utilisateur activé : {USERTRAIN_ENABLED} \nChanson : {song} \nTexte de démarrage : ```{splashtext}```".format_map({"NAME": NAME,"PREFIX": PREFIX,"ownerid": ownerid,"PING_LINE": PING_LINE,"showmemenabled": showmemenabled,"USERTRAIN_ENABLED": USERTRAIN_ENABLED,"song": song,"splashtext": splashtext})
+ if lang == 'it': return "Nome: {NAME} \nPrefisso: {PREFIX} \nID Proprietario: {ownerid}\nLinea ping: {PING_LINE} \nMemoria Condivisa Abilitata: {showmemenabled} \nAddestramento Utente Abilitato: {USERTRAIN_ENABLED}\nCanzone: {song} \nSplashtext: ```{splashtext}```".format_map({"NAME": NAME,"PREFIX": PREFIX,"ownerid": ownerid,"PING_LINE": PING_LINE,"showmemenabled": showmemenabled,"USERTRAIN_ENABLED": USERTRAIN_ENABLED,"song": song,"splashtext": splashtext})
+ else: raise ValueError(f'Invalid language {lang}')
+def no_image_available(lang:str|None=None):
+ """
+ ### Locales
+ - En: **No images available!**
+ - Es: **No images available!**
+ - Fi: **No images available!**
+ - Fr: **No images available!**
+ - It: **No images available!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "No images available!"
+ if lang == 'es': return "No images available!"
+ if lang == 'fi': return "No images available!"
+ if lang == 'fr': return "No images available!"
+ if lang == 'it': return "No images available!"
+ else: raise ValueError(f'Invalid language {lang}')
+def failed_generate_image(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Failed to generate an image**
+ - Es: **Failed to generate an image**
+ - Fi: **Failed to generate an image**
+ - Fr: **Failed to generate an image**
+ - It: **Failed to generate an image**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Failed to generate an image"
+ if lang == 'es': return "Failed to generate an image"
+ if lang == 'fi': return "Failed to generate an image"
+ if lang == 'fr': return "Failed to generate an image"
+ if lang == 'it': return "Failed to generate an image"
+ else: raise ValueError(f'Invalid language {lang}')
+def markov_model_not_found(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Markov model not found!**
+ - Es: **Markov model not found!**
+ - Fi: **Markov model not found!**
+ - Fr: **Markov model not found!**
+ - It: **Markov model not found!**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Markov model not found!"
+ if lang == 'es': return "Markov model not found!"
+ if lang == 'fi': return "Markov model not found!"
+ if lang == 'fr': return "Markov model not found!"
+ if lang == 'it': return "Markov model not found!"
+ else: raise ValueError(f'Invalid language {lang}')
+def blacklisted(lang:str|None=None):
+ """
+ ### Locales
+ - En: **blacklisted**
+ - Es: **blacklisted**
+ - Fi: **blacklisted**
+ - Fr: **blacklisted**
+ - It: **blacklisted**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "blacklisted"
+ if lang == 'es': return "blacklisted"
+ if lang == 'fi': return "blacklisted"
+ if lang == 'fr': return "blacklisted"
+ if lang == 'it': return "blacklisted"
+ else: raise ValueError(f'Invalid language {lang}')
+def blacklisted_user(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Blacklisted user**
+ - Es: **Blacklisted user**
+ - Fi: **Blacklisted user**
+ - Fr: **Blacklisted user**
+ - It: **Blacklisted user**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Blacklisted user"
+ if lang == 'es': return "Blacklisted user"
+ if lang == 'fi': return "Blacklisted user"
+ if lang == 'fr': return "Blacklisted user"
+ if lang == 'it': return "Blacklisted user"
+ else: raise ValueError(f'Invalid language {lang}')
+def edit_fail(lang:str|None=None):
+ """
+ ### Locales
+ - En: **Failed to edit message**
+ - Es: **Failed to edit message**
+ - Fi: **Failed to edit message**
+ - Fr: **Failed to edit message**
+ - It: **Failed to edit message**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "Failed to edit message"
+ if lang == 'es': return "Failed to edit message"
+ if lang == 'fi': return "Failed to edit message"
+ if lang == 'fr': return "Failed to edit message"
+ if lang == 'it': return "Failed to edit message"
+ else: raise ValueError(f'Invalid language {lang}')
+def system_info(lang:str|None=None):
+ """
+ ### Locales
+ - En: **System information**
+ - Es: **System information**
+ - Fi: **System information**
+ - Fr: **System information**
+ - It: **System information**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "System information"
+ if lang == 'es': return "System information"
+ if lang == 'fi': return "System information"
+ if lang == 'fr': return "System information"
+ if lang == 'it': return "System information"
+ else: raise ValueError(f'Invalid language {lang}')
+def cpu_info(cpu,lang:str|None=None):
+ """
+ ### Locales
+ - En: **CPU: {cpu}**
+ - Es: **CPU: {cpu}**
+ - Fi: **CPU: {cpu}**
+ - Fr: **CPU: {cpu}**
+ - It: **CPU: {cpu}**
+ """
+ if not lang: lang=default_lang
+ if lang == 'en': return "CPU: {cpu}".format_map({"cpu": cpu})
+ if lang == 'es': return "CPU: {cpu}".format_map({"cpu": cpu})
+ if lang == 'fi': return "CPU: {cpu}".format_map({"cpu": cpu})
+ if lang == 'fr': return "CPU: {cpu}".format_map({"cpu": cpu})
+ if lang == 'it': return "CPU: {cpu}".format_map({"cpu": cpu})
+ else: raise ValueError(f'Invalid language {lang}')
diff --git a/modules/logger.py b/modules/logger.py
new file mode 100644
index 0000000..3b9d361
--- /dev/null
+++ b/modules/logger.py
@@ -0,0 +1,28 @@
+import logging
+from modules.globalvars import *
+
+
+class GooberFormatter(logging.Formatter):
+ def __init__(self, colors: bool = True): # Disable colors for TXT output
+ self.colors = colors
+
+ self._format = f"[ %(levelname)-8s ]: %(message)s {DEBUG} [%(asctime)s.%(msecs)03d] (%(filename)s:%(funcName)s) {RESET}"
+
+ self.FORMATS = {
+ logging.DEBUG: DEBUG + self._format + RESET,
+ logging.INFO: self._format.replace(
+ "%(levelname)-8s", f"{GREEN}%(levelname)-8s{RESET}"
+ ),
+ logging.WARNING: YELLOW + self._format + RESET,
+ logging.ERROR: RED + self._format + RESET,
+ logging.CRITICAL: PURPLE + self._format + RESET,
+ }
+
+ def format(self, record: logging.LogRecord):
+ if self.colors:
+ log_fmt = self.FORMATS.get(record.levelno) # Add colors
+ else:
+ log_fmt = self._format # Just use the default format
+
+ formatter = logging.Formatter(log_fmt, datefmt="%m/%d/%y %H:%M:%S")
+ return formatter.format(record)
diff --git a/modules/markovmemory.py b/modules/markovmemory.py
new file mode 100644
index 0000000..cce5cf2
--- /dev/null
+++ b/modules/markovmemory.py
@@ -0,0 +1,81 @@
+import os
+import json
+import markovify
+import pickle
+from modules.globalvars import *
+import logging
+import modules.keys as k
+from modules.settings import instance as settings_manager
+
+settings = settings_manager.settings
+
+
+logger = logging.getLogger("goober")
+
+
+# Get file size and line count for a given file path
+def get_file_info(file_path):
+ try:
+ file_size = os.path.getsize(file_path)
+ with open(file_path, "r") as f:
+ lines = f.readlines()
+ return {"file_size_bytes": file_size, "line_count": len(lines)}
+ except Exception as e:
+ return {"error": str(e)}
+
+
+# Load memory data from file, or use default dataset if not loaded yet
+def load_memory():
+ data = []
+
+ # Try to load data from MEMORY_FILE
+ try:
+ with open(settings["bot"]["active_memory"], "r") as f:
+ data = json.load(f)
+ except FileNotFoundError:
+ pass
+
+ return data
+
+
+# Save memory data to MEMORY_FILE
+def save_memory(memory):
+ with open(settings["bot"]["active_memory"], "w") as f:
+ json.dump(memory, f, indent=4)
+
+
+def train_markov_model(memory, additional_data=None) -> markovify.NewlineText | None:
+ if not memory:
+ return None
+
+ filtered_memory = [line for line in memory if isinstance(line, str)]
+ if additional_data:
+ filtered_memory.extend(
+ line for line in additional_data if isinstance(line, str)
+ )
+
+ if not filtered_memory:
+ return None
+
+ text = "\n".join(filtered_memory)
+ model = markovify.NewlineText(text, state_size=2)
+ return model
+
+
+# Save the Markov model to a pickle file
+def save_markov_model(model, filename="markov_model.pkl"):
+ with open(filename, "wb") as f:
+ pickle.dump(model, f)
+ logger.info(f"Markov model saved to {filename}.")
+
+
+# Load the Markov model from a pickle file
+def load_markov_model(filename="markov_model.pkl"):
+ try:
+ with open(filename, "rb") as f:
+ model = pickle.load(f)
+ logger.info(f"{k.model_loaded()} {filename}.{RESET}")
+ return model
+ except FileNotFoundError:
+ logger.error(f"{filename} {k.not_found()}{RESET}")
+ return None
diff --git a/modules/permission.py b/modules/permission.py
new file mode 100644
index 0000000..86b1dd4
--- /dev/null
+++ b/modules/permission.py
@@ -0,0 +1,36 @@
+from functools import wraps
+import discord
+
+import discord.ext
+import discord.ext.commands
+
+from modules.settings import instance as settings_manager
+import logging
+
+logger = logging.getLogger("goober")
+
+settings = settings_manager.settings
+
+
+class PermissionError(Exception):
+ pass
+
+
+def requires_admin():
+ async def wrapper(ctx: discord.ext.commands.Context):
+ if ctx.author.id not in settings["bot"]["owner_ids"]:
+ await ctx.send(
+ "You don't have the necessary permissions to run this command!"
+ )
+ return False
+
+ command = ctx.command
+ if not command:
+ logger.info(f"Unknown command ran {ctx.message}")
+ else:
+ logger.info(
+ f'Command {settings["bot"]["prefix"]}{command.name} @{ctx.author.name}'
+ )
+ return True
+
+ return discord.ext.commands.check(wrapper)
diff --git a/modules/prestartchecks.py b/modules/prestartchecks.py
new file mode 100644
index 0000000..f4f4898
--- /dev/null
+++ b/modules/prestartchecks.py
@@ -0,0 +1,304 @@
+from modules.globalvars import *
+import time
+import os
+import sys
+import subprocess
+import sysconfig
+import ast
+import json
+import re
+from spacy.util import is_package
+import importlib.metadata
+import logging
+import modules.keys as k
+from modules.settings import instance as settings_manager
+from modules.sync_conenctor import instance as sync_hub
+
+settings = settings_manager.settings
+
+
+logger = logging.getLogger("goober")
+
+# import shutil
+psutilavaliable = True
+try:
+ import requests
+ import psutil
+except ImportError:
+ psutilavaliable = False
+ logger.error(k.missing_requests_psutil())
+
+
+def check_for_model():
+ if is_package("en_core_web_sm"):
+ logger.info("Model is installed.")
+ else:
+ logger.info("Model is not installed.")
+
+
+def iscloned():
+ if os.path.exists(".git"):
+ return True
+ else:
+ logger.error(f"{k.not_cloned()}")
+ sys.exit(1)
+
+
+def get_stdlib_modules():
+ stdlib_path = pathlib.Path(sysconfig.get_paths()["stdlib"])
+ modules = set()
+ if hasattr(sys, "builtin_module_names"):
+ modules.update(sys.builtin_module_names)
+ for file in stdlib_path.glob("*.py"):
+ if file.stem != "__init__":
+ modules.add(file.stem)
+ for folder in stdlib_path.iterdir():
+ if folder.is_dir() and (folder / "__init__.py").exists():
+ modules.add(folder.name)
+ for file in stdlib_path.glob("*.*"):
+ if file.suffix in (".so", ".pyd"):
+ modules.add(file.stem)
+
+ return modules
+
+
+def check_requirements():
+ STD_LIB_MODULES = get_stdlib_modules()
+ PACKAGE_ALIASES = {
+ "discord": "discord.py",
+ "better_profanity": "better-profanity",
+ "dotenv": "python-dotenv",
+ "pil": "pillow",
+ "websocket": "websocket-client"
+ }
+
+ parent_dir = os.path.dirname(os.path.abspath(__file__))
+ requirements_path = os.path.abspath(
+ os.path.join(parent_dir, "..", "requirements.txt")
+ )
+
+ if not os.path.exists(requirements_path):
+ logger.error(f"{k.requirements_not_found(path=requirements_path)}")
+ return
+
+ with open(requirements_path, "r") as f:
+ lines = f.readlines()
+ requirements = set()
+ for line in lines:
+ line = line.strip()
+ if line and not line.startswith("#"):
+ base_pkg = line.split("==")[0].lower()
+ aliased_pkg = PACKAGE_ALIASES.get(base_pkg, base_pkg)
+ requirements.add(aliased_pkg)
+
+ installed_packages = {
+ dist.metadata["Name"].lower() for dist in importlib.metadata.distributions()
+ }
+ missing = []
+
+ for req in sorted(requirements):
+ if req in STD_LIB_MODULES or req == "modules":
+ print(k.std_lib_local_skipped(package=req))
+ continue
+
+ check_name = req.lower()
+
+ if check_name in installed_packages:
+ logger.info(f"{k.ok_installed()} {check_name}")
+ else:
+ logger.error(f"{k.missing_package()} {check_name} {k.missing_package2()}")
+ missing.append(check_name)
+
+ if missing:
+ logger.error(k.missing_packages_detected())
+ for pkg in missing:
+ print(f" - {pkg}")
+ sys.exit(1)
+ else:
+ logger.info(k.all_requirements_satisfied())
+
+
+def check_latency():
+ host = "1.1.1.1"
+ system = platform.system()
+
+ if system == "Windows":
+ cmd = ["ping", "-n", "1", "-w", "1000", host]
+ latency_pattern = r"Average = (\d+)ms"
+
+ elif system == "Darwin":
+ cmd = ["ping", "-c", "1", host]
+ latency_pattern = r"time=([\d\.]+) ms"
+
+ else:
+ cmd = ["ping", "-c", "1", "-W", "1", host]
+ latency_pattern = r"time=([\d\.]+) ms"
+
+ try:
+ result = subprocess.run(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
+ )
+
+ if result.returncode == 0:
+ match = re.search(latency_pattern, result.stdout)
+ if match:
+ latency_ms = float(match.group(1))
+ logger.info(k.ping_to(host=host, latency=latency_ms))
+ if latency_ms > 300:
+ logger.warning(f"{k.high_latency()}")
+ else:
+ logger.warning(k.could_not_parse_latency())
+ else:
+ print(result.stderr)
+ logger.error(f"{k.ping_failed(host=host)}{RESET}")
+ except Exception as e:
+ logger.error(k.error_running_ping(error=e))
+
+
+def check_memory():
+ if psutilavaliable == False:
+ return
+ try:
+ memory_info = psutil.virtual_memory() # type: ignore
+ total_memory = memory_info.total / (1024**3)
+ used_memory = memory_info.used / (1024**3)
+ free_memory = memory_info.available / (1024**3)
+
+ logger.info(
+ k.memory_usage(
+ used=used_memory,
+ total=total_memory,
+ percent=(used_memory / total_memory) * 100,
+ )
+ )
+ if used_memory > total_memory * 0.9:
+ print(
+ f"{YELLOW}{k.memory_above_90(percent=(used_memory / total_memory) * 100)}{RESET}"
+ )
+ logger.info(k.total_memory(total=total_memory))
+ logger.info(k.used_memory(used=used_memory))
+ if free_memory < 1:
+ logger.warning(f"{k.low_free_memory(free=free_memory)}")
+
+ except ImportError:
+ logger.error(
+ k.psutil_not_installed()
+ ) # todo: translate this into italian and put it in the translations "psutil is not installed. Memory check skipped."
+
+
+def check_cpu():
+ if psutilavaliable == False:
+ return
+ logger.info(k.measuring_cpu())
+ cpu_per_core = psutil.cpu_percent(interval=1, percpu=True) # type: ignore
+ total_cpu = sum(cpu_per_core) / len(cpu_per_core)
+ logger.info(k.total_cpu_usage(usage=total_cpu))
+
+ if total_cpu > 85:
+ logger.warning(f"{k.high_avg_cpu(usage=total_cpu)}")
+
+ if total_cpu > 95:
+ logger.error(k.really_high_cpu())
+ sys.exit(1)
+
+
+def check_memoryjson():
+ try:
+ logger.info(
+ k.memory_file(
+ size=os.path.getsize(settings["bot"]["active_memory"]) / (1024**2)
+ )
+ )
+ if os.path.getsize(settings["bot"]["active_memory"]) > 1_073_741_824:
+ logger.warning(f"{k.memory_file_large()}")
+ try:
+ with open(settings["bot"]["active_memory"], "r", encoding="utf-8") as f:
+ json.load(f)
+
+ except json.JSONDecodeError as e:
+ logger.error(f"{k.memory_file_corrupted(error=e)}")
+ logger.warning(f"{k.consider_backup_memory()}")
+
+ except UnicodeDecodeError as e:
+ logger.error(f"{k.memory_file_encoding(error=e)}")
+ logger.warning(f"{k.consider_backup_memory()}")
+
+ except Exception as e:
+ logger.error(f"{k.error_reading_memory(error=e)}")
+ except FileNotFoundError:
+ logger.info(f"{k.memory_file_not_found()}")
+
+
+def presskey2skip(timeout):
+ if os.name == "nt":
+ import msvcrt
+
+ start_time = time.time()
+ while True:
+ if msvcrt.kbhit():
+ msvcrt.getch()
+ break
+ if time.time() - start_time > timeout:
+ break
+ time.sleep(0.1)
+ else:
+ import select
+ import sys
+ import termios
+ import tty
+
+ fd = sys.stdin.fileno()
+ old_settings = termios.tcgetattr(fd)
+ try:
+ tty.setcbreak(fd)
+ start_time = time.time()
+ while True:
+ if select.select([sys.stdin], [], [], 0)[0]:
+ sys.stdin.read(1)
+ break
+ if time.time() - start_time > timeout:
+ break
+ time.sleep(0.1)
+ finally:
+ termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
+
+def check_synchub():
+ if not sync_hub.connected:
+ logger.warning("Sync hub not connected properly! The bot will not be able to react to messages, or create breaking news unless you disable synchub in settings")
+ else:
+ logger.info("Sync hub is conencted")
+
+beta = beta
+
+
+def start_checks():
+ if settings["disable_checks"]:
+ logger.warning(f"{k.checks_disabled()}")
+ return
+
+ logger.info(k.running_prestart_checks())
+ check_for_model()
+ iscloned()
+ check_requirements()
+ check_latency()
+ check_memory()
+ check_memoryjson()
+ check_cpu()
+ check_synchub()
+ if os.path.exists(".env"):
+ pass
+ else:
+ logger.warning(f"{k.env_file_not_found()}")
+ sys.exit(1)
+ if beta == True:
+ logger.warning(
+ f"this build isnt finished yet, some things might not work as expected"
+ )
+ else:
+ pass
+ logger.info(k.continuing_in_seconds(seconds=5))
+ presskey2skip(timeout=5)
+ os.system("cls" if os.name == "nt" else "clear")
+
+ with open(settings["splash_text_loc"], "r") as f:
+ print("".join(f.readlines()))
diff --git a/modules/sentenceprocessing.py b/modules/sentenceprocessing.py
new file mode 100644
index 0000000..839c36a
--- /dev/null
+++ b/modules/sentenceprocessing.py
@@ -0,0 +1,95 @@
+import re
+import discord.ext
+import discord.ext.commands
+from modules.globalvars import *
+import spacy
+from spacy.tokens import Doc
+from spacytextblob.spacytextblob import SpacyTextBlob
+import discord
+import modules.keys as k
+
+import logging
+
+logger = logging.getLogger("goober")
+
+
+def check_resources():
+ try:
+ nlp = spacy.load("en_core_web_sm")
+ except OSError:
+ logging.critical(k.spacy_model_not_found())
+ spacy.cli.download("en_core_web_sm") # type: ignore
+ nlp = spacy.load("en_core_web_sm")
+ if "spacytextblob" not in nlp.pipe_names:
+ nlp.add_pipe("spacytextblob")
+ logger.info(k.spacy_initialized())
+
+
+check_resources()
+
+nlp = spacy.load("en_core_web_sm")
+nlp.add_pipe("spacytextblob")
+Doc.set_extension("polarity", getter=lambda doc: doc._.blob.polarity)
+
+
+def is_positive(sentence):
+ doc = nlp(sentence)
+ sentiment_score = doc._.polarity # from spacytextblob
+
+ debug_message = f"{k.sentence_positivity()} {sentiment_score}{RESET}"
+ logger.debug(debug_message)
+
+ return (
+ sentiment_score > 0.6
+ ) # had to raise the bar because it kept saying "death to jews" was fine and it kept reacting to them
+
+
+async def send_message(
+ ctx: discord.ext.commands.Context,
+ message: str | None = None,
+ embed: discord.Embed | None = None,
+ file: discord.File | None = None,
+ edit: bool = False,
+ message_reference: discord.Message | None = None,
+) -> discord.Message | None:
+
+ sent_message: discord.Message | None = None
+
+ if edit and message_reference:
+ try:
+ await message_reference.edit(content=message, embed=embed)
+ return message_reference
+ except Exception as e:
+ await ctx.send(f"{k.edit_fail()} {e}")
+ return None
+
+ if embed:
+ sent_message = await ctx.send(embed=embed, content=message)
+ elif file:
+ sent_message = await ctx.send(file=file, content=message)
+ else:
+ sent_message = await ctx.send(content=message)
+
+ return sent_message
+
+
+def append_mentions_to_18digit_integer(message):
+ pattern = r"\b\d{18}\b"
+ return re.sub(pattern, lambda match: "", message)
+
+
+def preprocess_message(message):
+ message = append_mentions_to_18digit_integer(message)
+ doc = nlp(message)
+ tokens = [token.text for token in doc if token.is_alpha or token.is_digit]
+ return " ".join(tokens)
+
+
+def improve_sentence_coherence(sentence):
+ return re.sub(r"\bi\b", "I", sentence)
+
+
+def rephrase_for_coherence(sentence):
+ words = sentence.split()
+ coherent_sentence = " ".join(words)
+ return coherent_sentence
diff --git a/modules/settings.py b/modules/settings.py
new file mode 100644
index 0000000..8943453
--- /dev/null
+++ b/modules/settings.py
@@ -0,0 +1,155 @@
+import json
+import os
+from typing import Dict, List, Literal, Mapping, Any, TypedDict
+from modules.keys import Language
+import logging
+import copy
+
+logger = logging.getLogger("goober")
+
+ActivityType = Literal["listening", "playing", "streaming", "competing", "watching"]
+
+class SyncHub(TypedDict):
+ url: str
+ enabled: bool
+
+class Activity(TypedDict):
+ content: str
+ type: ActivityType
+
+
+class MiscBotOptions(TypedDict):
+ ping_line: str
+ activity: Activity
+ positive_gifs: List[str]
+ block_profanity: bool
+
+
+class BotSettings(TypedDict):
+ prefix: str
+ owner_ids: List[int]
+ blacklisted_users: List[int]
+ user_training: bool
+ allow_show_mem_command: bool
+ react_to_messages: bool
+ misc: MiscBotOptions
+ enabled_cogs: List[str]
+ active_memory: str
+ sync_hub: SyncHub
+
+
+class SettingsType(TypedDict):
+ bot: BotSettings
+ locale: Language
+ name: str
+ auto_update: bool
+ disable_checks: bool
+ splash_text_loc: str
+ cog_settings: Dict[str, Mapping[Any, Any]]
+
+
+class AdminLogEvent(TypedDict):
+ messageId: int
+ author: int
+ target: str | int
+ action: Literal["del", "add", "set"]
+ change: Literal["owner_ids", "blacklisted_users", "enabled_cogs"]
+
+
+class Settings:
+ def __init__(self) -> None:
+ global instance
+ instance = self
+
+ self.path: str = os.path.join(".", "settings", "settings.json")
+
+ if not os.path.exists(self.path):
+ logger.critical(
+ f"Missing settings file from {self.path}! Did you forget to copy settings.example.json?"
+ )
+ raise ValueError("settings.json file does not exist!")
+
+ self.settings: SettingsType
+ self.original_settings: SettingsType
+
+ with open(self.path, "r") as f:
+ self.__kv_store: dict = json.load(f)
+
+ self.settings = SettingsType(self.__kv_store) # type: ignore
+ self.original_settings = copy.deepcopy(self.settings)
+
+ self.log_path: str = os.path.join(".", "settings", "admin_logs.json")
+
+ self.migrate()
+
+ def migrate(self):
+ active_song: str | None = (
+ self.settings.get("bot", {}).get("misc", {}).get("active_song")
+ )
+
+ if active_song:
+ logger.warning("Found deprecated active_song, migrating")
+
+ self.settings["bot"]["misc"]["activity"] = {
+ "content": active_song,
+ "type": "listening",
+ }
+
+ del self.settings["bot"]["misc"]["active_song"] # type: ignore
+
+ sync_hub: SyncHub | None = self.settings.get("bot", {}).get("sync_hub")
+
+ if not sync_hub:
+ logger.warning("Adding sync hub settings")
+ self.settings["bot"]["sync_hub"] = {
+ "enabled": True,
+ "url": "ws://goober.frii.site"
+ }
+
+ self.commit()
+
+ def reload_settings(self) -> None:
+ with open(self.path, "r") as f:
+ self.__kv_store: dict = json.load(f)
+
+ self.settings = SettingsType(self.__kv_store) # type: ignore
+ self.original_settings = copy.deepcopy(self.settings)
+
+ def commit(self) -> None:
+ with open(self.path, "w") as f:
+ json.dump(self.settings, f, ensure_ascii=False, indent=4)
+
+ self.original_settings = self.settings
+
+ def discard(self) -> None:
+ self.settings = self.original_settings
+
+ def get_plugin_settings(
+ self, plugin_name: str, default: Mapping[Any, Any]
+ ) -> Mapping[Any, Any]:
+ return self.settings["cog_settings"].get(plugin_name, default)
+
+ def set_plugin_setting(
+ self, plugin_name: str, new_settings: Mapping[Any, Any]
+ ) -> None:
+ """Changes a plugin setting. Commits changes"""
+ self.settings["cog_settings"][plugin_name] = new_settings
+
+ self.commit()
+
+ def add_admin_log_event(self, event: AdminLogEvent):
+ if not os.path.exists(self.log_path):
+ logger.warning("Admin log doesn't exist!")
+ with open(self.log_path, "w") as f:
+ json.dump([], f)
+
+ with open(self.log_path, "r") as f:
+ logs: List[AdminLogEvent] = json.load(f)
+
+ logs.append(event)
+
+ with open(self.log_path, "w") as f:
+ json.dump(logs, f, ensure_ascii=False, indent=4)
+
+
+instance: Settings = Settings()
diff --git a/modules/sync_conenctor.py b/modules/sync_conenctor.py
new file mode 100644
index 0000000..588c772
--- /dev/null
+++ b/modules/sync_conenctor.py
@@ -0,0 +1,94 @@
+import websocket
+from modules.settings import instance as settings_manager
+import logging
+
+
+logger = logging.getLogger("goober")
+settings = settings_manager.settings
+
+class SyncConnector:
+ def __init__(self, url: str):
+ self.connected: bool = True
+ self.url = url
+ self.client: websocket.WebSocket | None = None
+
+ self.try_to_connect()
+
+ def __connect(self) -> bool:
+ try:
+ self.client = websocket.create_connection(self.url)
+ except OSError as e:
+ logger.debug(e)
+ logger.debug(e.strerror)
+ return False
+
+ return True
+
+ def try_to_connect(self) -> bool:
+ if self.__connect():
+ logger.info("Connected to sync hub!")
+ self.connected = True
+ else:
+ logger.error("Failed to connect to sync hub.. Disabling for the time being")
+ self.connected = False
+
+ return self.connected
+
+
+ def can_react(self, message_id: int) -> bool:
+ """
+ Checks if goober can react to a messsage
+ """
+
+ return self.can_event(message_id, "react")
+
+
+ def can_breaking_news(self, message_id: int) -> bool:
+ """
+ Checks if goober can send a breaking news alert
+ """
+
+ return self.can_event(message_id, "breaking_news")
+
+
+ def can_event(self, message_id: int, event: str, retry_depth: int = 0) -> bool:
+ """
+ Checks if goober can send a breaking news alert
+ """
+
+ logger.debug(f"Checking {event} for message {message_id}")
+
+ if not settings["bot"]["sync_hub"]["enabled"]:
+ logger.info("Skipping sync hub check")
+ return True
+
+ if retry_depth > 2:
+ logger.error("Too many retries. Returning false")
+ return False
+
+ if not self.client:
+ logger.error("Client no connected")
+ return False
+
+ if not self.connected:
+ logger.warning("Not connected to sync hub.. Returning False to avoid conflicts")
+ return False
+
+ try:
+ self.client.send(f"event={event};ref={message_id}")
+ return self.client.recv() == "unhandled"
+ except ConnectionResetError:
+ logger.error("Connection to sync hub reset! Retrying...")
+
+ if not self.__connect():
+ logger.error("Failed to reconnect to sync hub... Disabling")
+ self.connected = False
+ return False
+
+ logger.info("Managed to reconnect to sync hub! Retrying requests")
+ self.connected = True
+ return self.can_event(message_id, event, retry_depth+1)
+
+
+
+instance = SyncConnector(settings["bot"]["sync_hub"]["url"])
\ No newline at end of file
diff --git a/modules/unhandledexception.py b/modules/unhandledexception.py
new file mode 100644
index 0000000..1118329
--- /dev/null
+++ b/modules/unhandledexception.py
@@ -0,0 +1,29 @@
+import sys
+import traceback
+import os
+from modules.settings import instance as settings_manager
+import logging
+from modules.globalvars import RED, RESET
+import modules.keys as k
+
+settings = settings_manager.settings
+logger = logging.getLogger("goober")
+
+
+def handle_exception(exc_type, exc_value, exc_traceback, *, context=None):
+ os.system("cls" if os.name == "nt" else "clear")
+
+ if issubclass(exc_type, KeyboardInterrupt):
+ sys.__excepthook__(exc_type, exc_value, exc_traceback)
+ return
+
+ with open(settings["splash_text_loc"], "r") as f:
+ print("".join(f.readlines()))
+
+ print(f"{RED}=====BEGINNING OF TRACEBACK====={RESET}")
+ traceback.print_exception(exc_type, exc_value, exc_traceback)
+ print(f"{RED}========END OF TRACEBACK========{RESET}")
+ print(f"{RED}{k.unhandled_exception()}{RESET}")
+
+ if context:
+ print(f"{RED}Context: {context}{RESET}")
diff --git a/replace_volta.py b/replace_volta.py
new file mode 100644
index 0000000..3c7b86f
--- /dev/null
+++ b/replace_volta.py
@@ -0,0 +1,51 @@
+import os
+import re
+
+folder_path = "."
+
+# Real trap regex 😮💨 — group(1)=key, group(2)=format args (optional)
+pattern = re.compile(
+ r"""
+ (? None:
+ logger.info("Forcefully updating...")
+ stash = subprocess.run(["git", "stash"], capture_output=True)
+ logger.info(stash)
+ pull = subprocess.run(["git", "pull", "origin", "main"], check=True, capture_output=True)
+ logger.info(pull)
+