From 24beb9a42e92cd74f3584ead646d307869459271 Mon Sep 17 00:00:00 2001 From: WhatDidYouExpect <89535984+WhatDidYouExpect@users.noreply.github.com> Date: Wed, 9 Jul 2025 22:57:59 +0200 Subject: [PATCH] cleaned up the .env n shit --- bot.py | 3 ++- example.env | 33 ++++++++++++++++++--------------- modules/central.py | 4 ++-- modules/globalvars.py | 24 ++++++++++++------------ modules/volta/main.py | 2 +- 5 files changed, 35 insertions(+), 31 deletions(-) diff --git a/bot.py b/bot.py index 8cb283d..b11da34 100644 --- a/bot.py +++ b/bot.py @@ -468,7 +468,8 @@ async def about(ctx: commands.Context) -> None: embed: discord.Embed = discord.Embed(title=f"{(_('command_about_embed_title'))}", description="", color=Colour(0x000000)) embed.add_field(name=f"{(_('command_about_embed_field1'))}", value=f"{NAME}", inline=False) embed.add_field(name=f"{(_('command_about_embed_field2name'))}", value=f"{(_('command_about_embed_field2value')).format(local_version=local_version, latest_version=latest_version)}", inline=False) - + embed.add_field(name=f"Github", value=f"https://github.com/gooberinc/goober") + await send_message(ctx, embed=embed) # Command: Show bot statistics (admin only) diff --git a/example.env b/example.env index 50d672d..03c30c6 100644 --- a/example.env +++ b/example.env @@ -1,18 +1,21 @@ -DISCORD_BOT_TOKEN=token -BOT_PREFIX="g." -PING_LINE="The Beretta fires fast and won't make you feel any better!" -BLACKLISTED_USERS= -USERTRAIN_ENABLED="true" -showmemenabled="true" -NAME="an instance of goober" -locale=fi -ALIVEPING="true" +DISCORDBOTTOKEN= +BOTPREFIX="g." +PINGLINE="The Beretta fires fast and won't make you feel any better!" +BLACKLISTEDUSERS= +OWNERID= +USERTRAINENABLED="true" +SHOWMEMENABLED="true" +NAME="gooberino goobs" +LOCALE=fi +ALIVEPING="True" AUTOUPDATE="True" -gooberTOKEN= -song="A Heart of Cold - Heaven Pierce Her" +GOOBERTOKEN= +SONG="Basket Case - Green Day" +CHECKSDISABLED="Frue" REACT="True" -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" -splashtext=" +POSITIVEGIFS="https://media.discordapp.net/attachments/821047460151427135/1181371808566493184/jjpQGeno.gif, https://tenor.com/view/chill-guy-my-new-character-gif-2777893510283028272,https://tenor.com/view/goodnight-goodnight-friends-weezer-weezer-goodnight-gif-7322052181075806988" +SPLASHTEXT=" + SS\ SS | SSSSSS\ SSSSSS\ SSSSSS\ SSSSSSS\ SSSSSS\ SSSSSS\ @@ -23,5 +26,5 @@ SS | SS |SS | SS |SS | SS |SS | SS |SS ____|SS | \____SS | \______/ \______/ \_______/ \_______|\__| SS\ SS | \SSSSSS | - \______/ -" + \______/ +" \ No newline at end of file diff --git a/modules/central.py b/modules/central.py index 6293bbb..f13b23f 100644 --- a/modules/central.py +++ b/modules/central.py @@ -54,7 +54,7 @@ def is_name_available(NAME): return data.get("available", False) else: # Print error if request failed - logger.e(f"{(_('name_check'))}", response.json()) + logger.error(f"{(_('name_check'))}", response.json()) return False except Exception as e: # Print exception if request failed @@ -69,7 +69,7 @@ def register_name(NAME): return # Check if the name is available if not is_name_available(NAME): - if os.getenv("gooberTOKEN"): + if os.getenv("GOOBERTOKEN"): return # Name taken: print error and exit logger.critical(f"{(_('name_taken'))}") diff --git a/modules/globalvars.py b/modules/globalvars.py index 3c76bc7..3469db3 100644 --- a/modules/globalvars.py +++ b/modules/globalvars.py @@ -16,17 +16,17 @@ RESET = f"{ANSI}0m" VERSION_URL = "https://goober.expect.ovh" UPDATE_URL = VERSION_URL+"/latest_version.json" LOCAL_VERSION_FILE = "current_version.txt" -TOKEN = os.getenv("DISCORD_BOT_TOKEN", "0") -PREFIX = os.getenv("BOT_PREFIX", "g.") -PING_LINE = os.getenv("PING_LINE") -CHECKS_DISABLED = os.getenv("CHECKS_DISABLED") -LOCALE = os.getenv("locale", "en") -gooberTOKEN = os.getenv("gooberTOKEN") -splashtext = os.getenv("splashtext") -ownerid = int(os.getenv("ownerid", "0")) -showmemenabled = os.getenv("showmemenabled") -BLACKLISTED_USERS = os.getenv("BLACKLISTED_USERS", "").split(",") -USERTRAIN_ENABLED = os.getenv("USERTRAIN_ENABLED", "true").lower() == "true" +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") +gooberTOKEN = os.getenv("GOOBERTOKEN") +splashtext = os.getenv("SPLASHTEXT") +ownerid = int(os.getenv("OWNERID", "0")) +showmemenabled = os.getenv("SHOWMEMENABLED") +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 @@ -41,5 +41,5 @@ latest_version = "0.0.0" local_version = "2.1.3" 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 +beta = True # this makes goober think its a beta version, so it will not update to the latest stable version or run any version checks \ No newline at end of file diff --git a/modules/volta/main.py b/modules/volta/main.py index b8e88ea..03f5d4f 100644 --- a/modules/volta/main.py +++ b/modules/volta/main.py @@ -18,7 +18,7 @@ RESET = f"{ANSI}0m" load_dotenv() -LOCALE = os.getenv("locale") +LOCALE = os.getenv("LOCALE") module_dir = pathlib.Path(__file__).parent.parent working_dir = pathlib.Path.cwd() EXCLUDE_DIRS = {'.git', '__pycache__'}