no no FUCKING NO

This commit is contained in:
WhatDidYouExpect 2025-07-07 20:41:24 +02:00
parent 2b4c6bcf14
commit fb861e2671
16 changed files with 1792 additions and 18 deletions

3
.gitignore vendored
View file

@ -12,3 +12,6 @@ received_memory.json
translation_report.txt
translationcompleteness.py
modules/volta
fireboard.db
fireboard.db-shm
fireboard.db-wal

1756
assets/cogs/fireboard.py Normal file

File diff suppressed because it is too large Load diff

View file

@ -128,6 +128,6 @@
"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} \nCooldown: {cooldown_time} \nPing line: {PING_LINE} \nMemory Sharing Enabled: {showmemenabled} \nUser Training Enabled: {USERTRAIN_ENABLED}\nSong: {song} \nSplashtext: ```{splashtext}```"
"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}```"
}

View file

@ -73,5 +73,5 @@
"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} \nTiempo de reutilizacion: {cooldown_time} \nLinea de ping: {PING_LINE} \nCompartir memoria habilitada: {showmemenabled} \nEntrenamiento de usuario habilitado: {USERTRAIN_ENABLED} \nCancion: {song} \nTexto de bienvenida: ```{splashtext}```"
"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}```"
}

View file

@ -126,6 +126,6 @@
"command_stats_embed_field2name": "Versioon",
"command_stats_embed_field2value": "Kohalik: {local_version} \nViimane: {latest_version}",
"command_stats_embed_field3name": "Muutuja info",
"command_stats_embed_field3value": "Nimi: {NAME} \nPrefiks: {PREFIX} \nOmaniku ID: {ownerid} \nJahtumisaeg: {cooldown_time} \nPingirida: {PING_LINE} \nMälu jagamine lubatud: {showmemenabled} \nKasutajaõpe lubatud: {USERTRAIN_ENABLED}\nLaul: {song} \nSplashtekst: ```{splashtext}```"
"command_stats_embed_field3value": "Nimi: {NAME} \nPrefiks: {PREFIX} \nOmaniku ID: {ownerid}\nPingirida: {PING_LINE} \nMälu jagamine lubatud: {showmemenabled} \nKasutajaõpe lubatud: {USERTRAIN_ENABLED}\nLaul: {song} \nSplashtekst: ```{splashtext}```"
}

View file

@ -128,6 +128,6 @@
"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} \nJäähtymisaika: {cooldown_time} \nPing-linja: {PING_LINE} \nMuistin jako päällä: {showmemenabled} \nOppiminen käyttäjistä: {USERTRAIN_ENABLED}\nLaulu: {song} \nRoisketeksti: ```{splashtext}```"
"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}```"
}

View file

@ -126,5 +126,5 @@
"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} \nTemps de recharge : {cooldown_time} \nLigne de ping : {PING_LINE} \nPartage de mémoire activé : {showmemenabled} \nEntraînement utilisateur activé : {USERTRAIN_ENABLED} \nChanson : {song} \nTexte de démarrage : ```{splashtext}```"
"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}```"
}

View file

@ -121,5 +121,5 @@
"command_stats_embed_field2name": "Ferzje",
"command_stats_embed_field2value": "Lokaal: {local_version} \nLêste: {latest_version}",
"command_stats_embed_field3name": "Fariabel Info",
"command_stats_embed_field3value": "Namme: {NAME} \nFoarheaksel: {PREFIX} \nEigner ID: {ownerid} \nCooldown: {cooldown_time} \nPingrigel: {PING_LINE} \nUnthâld Dielen Ynskeakele: {showmemenabled} \nBrûkerstraining Ynskeakele: {USERTRAIN_ENABLED}\nLiet: {song} \nSplashtekst: ```{splashtext}```"
"command_stats_embed_field3value": "Namme: {NAME} \nFoarheaksel: {PREFIX} \nEigner ID: {ownerid}\nPingrigel: {PING_LINE} \nUnthâld Dielen Ynskeakele: {showmemenabled} \nBrûkerstraining Ynskeakele: {USERTRAIN_ENABLED}\nLiet: {song} \nSplashtekst: ```{splashtext}```"
}

View file

@ -129,6 +129,6 @@
"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} \nCooldown: {cooldown_time} \nLinea ping: {PING_LINE} \nMemoria Condivisa Abilitata: {showmemenabled} \nAddestramento Utente Abilitato: {USERTRAIN_ENABLED}\nCanzone: {song} \nSplashtext: ```{splashtext}```"
"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}```"
}

View file

@ -121,5 +121,5 @@
"command_stats_embed_field2name": "Verżjoni",
"command_stats_embed_field2value": "Lokali: {local_version} \nĠdida: {latest_version}",
"command_stats_embed_field3name": "Informazzjoni Varjabbli",
"command_stats_embed_field3value": "Isem: {NAME} \nPrefiss: {PREFIX} \nID ta Sid: {ownerid} \nCooldown: {cooldown_time} \nPing line: {PING_LINE} \nImoħħar Memenja: {showmemenabled} \nUser Training Attiva: {USERTRAIN_ENABLED}\nKan ta: {song} \nSplashtext: ```{splashtext}```"
"command_stats_embed_field3value": "Isem: {NAME} \nPrefiss: {PREFIX} \nID ta Sid: {ownerid}\nPing line: {PING_LINE} \nImoħħar Memenja: {showmemenabled} \nUser Training Attiva: {USERTRAIN_ENABLED}\nKan ta: {song} \nSplashtext: ```{splashtext}```"
}

14
bot.py
View file

@ -20,6 +20,7 @@ print(splashtext) # Print splash text (from modules/globalvars.py)
start_checks()
import requests
import asqlite
import discord
from discord.ext import commands
@ -62,6 +63,9 @@ bot: commands.Bot = commands.Bot(
allowed_mentions=discord.AllowedMentions(everyone=False, roles=False, users=False, replied_user=True)
)
# Initialize database pool for fireboard functionality
bot.fireboard_pool = None
# Load memory and Markov model for text generation
memory: List[str] = load_memory()
markov_model: Optional[markovify.Text] = load_markov_model()
@ -114,6 +118,14 @@ async def on_ready() -> None:
folder_name: str = "cogs"
if launched:
return
# Initialize database pool for fireboard functionality
try:
bot.fireboard_pool = await asqlite.create_pool("fireboard.db")
print(f"{GREEN}Database pool initialized successfully{RESET}")
except Exception as e:
print(f"{RED}Failed to initialize database pool: {e}{RESET}")
bot.fireboard_pool = None
await load_cogs_from_folder(bot)
try:
@ -473,7 +485,7 @@ async def stats(ctx: commands.Context) -> None:
embed: discord.Embed = discord.Embed(title=f"{(_('command_stats_embed_title'))}", description=f"{(_('command_stats_embed_desc'))}", color=Colour(0x000000))
embed.add_field(name=f"{(_('command_stats_embed_field1name'))}", value=f"{(_('command_stats_embed_field1value')).format(file_size=file_size, line_count=line_count)}", inline=False)
embed.add_field(name=f"{(_('command_stats_embed_field2name'))}", value=f"{(_('command_stats_embed_field2value')).format(local_version=local_version, latest_version=latest_version)}", inline=False)
embed.add_field(name=f"{(_('command_stats_embed_field3name'))}", value=f"{(_('command_stats_embed_field3value')).format(NAME=NAME, PREFIX=PREFIX, ownerid=ownerid, cooldown_time=cooldown_time, PING_LINE=PING_LINE, showmemenabled=showmemenabled, USERTRAIN_ENABLED=USERTRAIN_ENABLED, song=song, splashtext=splashtext)}", inline=False)
embed.add_field(name=f"{(_('command_stats_embed_field3name'))}", value=f"{(_('command_stats_embed_field3value')).format(NAME=NAME, PREFIX=PREFIX, ownerid=ownerid, PING_LINE=PING_LINE, showmemenabled=showmemenabled, USERTRAIN_ENABLED=USERTRAIN_ENABLED, song=song, splashtext=splashtext)}", inline=False)
await send_message(ctx, embed=embed)

View file

@ -70,7 +70,7 @@ def register_name(NAME):
if os.getenv("gooberTOKEN"):
return
# Name taken: print error and exit
print(f"{RED}{(_('name_taken'))}{gv.RESET}")
print(f"{gv.RED}{(_('name_taken'))}{gv.RESET}")
quit()
# Register the name
response = requests.post(f"{gv.VERSION_URL}/register", json={"name": NAME}, headers={"Content-Type": "application/json"})

View file

@ -37,7 +37,7 @@ 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.0.2"
local_version = "2.1.0"
os.environ['gooberlocal_version'] = local_version
REACT = os.getenv("REACT")
beta = False # this makes goober think its a beta version, so it will not update to the latest stable version or run any version checks

View file

@ -127,7 +127,7 @@ def check_requirements():
"token": gooberTOKEN
}
try:
requests.post(VERSION_URL + "/ping", json=payload)
requests.post(VERSION_URL + "/ping", json=payload) # type: ignore
except Exception as e:
print(f"{RED}{(_('failed_to_contact')).format(url=VERSION_URL, error=e)}{RESET}")
sys.exit(1)
@ -173,7 +173,7 @@ def check_memory():
if psutilavaliable == False:
return
try:
memory_info = psutil.virtual_memory()
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)
@ -193,7 +193,7 @@ def check_cpu():
if psutilavaliable == False:
return
print((_('measuring_cpu')))
cpu_per_core = psutil.cpu_percent(interval=1, percpu=True)
cpu_per_core = psutil.cpu_percent(interval=1, percpu=True) # type: ignore
for idx, core_usage in enumerate(cpu_per_core):
bar_length = int(core_usage / 5)
bar = '' * bar_length + '-' * (20 - bar_length)

View file

@ -7,4 +7,5 @@ psutil
better_profanity
python-dotenv
dotenv
pillow
pillow
asqlite

View file

@ -1,3 +1,5 @@
The catbox.moe team
Charlie's Computers
ctih1
- The catbox.moe team for memory.json file uploads
- Charlie's Computers
- ctih1
- RestartB (for the Fireboard cog from his Titanium bot)
- Claude 4 Sonnet (for slightly modifying main.py and fireboard.py to work with Goober)