From ae2d565004b7f32314f1af605be77ebd0300d1d1 Mon Sep 17 00:00:00 2001 From: WhatDidYouExpect <89535984+WhatDidYouExpect@users.noreply.github.com> Date: Fri, 18 Jul 2025 01:29:31 +0200 Subject: [PATCH 1/5] dynamic git URL --- bot.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 6833874..9315b3a 100644 --- a/bot.py +++ b/bot.py @@ -459,6 +459,17 @@ async def ping(ctx: commands.Context) -> None: await ctx.send(embed=LOLembed) +def get_git_remote_url(): + try: + url = subprocess.check_output( + ["git", "config", "--get", "remote.origin.url"], + text=True, + stderr=subprocess.DEVNULL, + ).strip() + return url + except subprocess.CalledProcessError: + return "Unknown" + # Command: Show about information @bot.hybrid_command(description=f"{(_('command_about_desc'))}") async def about(ctx: commands.Context) -> None: @@ -468,7 +479,7 @@ 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") + embed.add_field(name=f"Github", value=get_git_remote_url()) await send_message(ctx, embed=embed) From 4a695a7baca6c4c5d99d743a68032ef2a1371108 Mon Sep 17 00:00:00 2001 From: WhatDidYouExpect <89535984+WhatDidYouExpect@users.noreply.github.com> Date: Fri, 18 Jul 2025 01:30:57 +0200 Subject: [PATCH 2/5] added os why not fuck it amirite --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 9315b3a..45da38d 100644 --- a/bot.py +++ b/bot.py @@ -7,8 +7,8 @@ import traceback import subprocess import tempfile import shutil -import uuid import asyncio +import platform import sys from typing import List, Dict, Set, Optional, Tuple, Any, Union, Callable, Coroutine, TypeVar, Type import logging @@ -480,6 +480,7 @@ async def about(ctx: commands.Context) -> None: 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=get_git_remote_url()) + embed.add_field(name=f"OS", value=platform.platform) await send_message(ctx, embed=embed) From cbe7fe201fb4f18e3826cbf65e807e6f11a9bd60 Mon Sep 17 00:00:00 2001 From: WhatDidYouExpect <89535984+WhatDidYouExpect@users.noreply.github.com> Date: Fri, 18 Jul 2025 01:31:46 +0200 Subject: [PATCH 3/5] dumbass forgot to add () --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 45da38d..4178468 100644 --- a/bot.py +++ b/bot.py @@ -480,7 +480,7 @@ async def about(ctx: commands.Context) -> None: 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=get_git_remote_url()) - embed.add_field(name=f"OS", value=platform.platform) + embed.add_field(name=f"OS", value=platform.platform()) await send_message(ctx, embed=embed) From 01b40f8b58091507f50ecea9b4ab42b8f6edd41e Mon Sep 17 00:00:00 2001 From: WhatDidYouExpect <89535984+WhatDidYouExpect@users.noreply.github.com> Date: Fri, 18 Jul 2025 01:33:01 +0200 Subject: [PATCH 4/5] added python version jst incase --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 4178468..5d11e6b 100644 --- a/bot.py +++ b/bot.py @@ -502,7 +502,8 @@ async def stats(ctx: commands.Context) -> None: 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, PING_LINE=PING_LINE, showmemenabled=showmemenabled, USERTRAIN_ENABLED=USERTRAIN_ENABLED, song=song, splashtext=splashtext)}", inline=False) - + embed.add_field(name=f"OS", value=platform.platform()) + embed.add_field(name="Python Version", value=platform.python_version()) await send_message(ctx, embed=embed) # Command: Upload memory.json to litterbox.catbox.moe and return the link From f5d7121dfb315cc3ebf902a15a149a80109284bf Mon Sep 17 00:00:00 2001 From: WhatDidYouExpect <89535984+WhatDidYouExpect@users.noreply.github.com> Date: Fri, 18 Jul 2025 01:36:16 +0200 Subject: [PATCH 5/5] changed from github to git cause i self host it now (i use arch btw) --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 5d11e6b..38a01b4 100644 --- a/bot.py +++ b/bot.py @@ -479,7 +479,7 @@ 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=get_git_remote_url()) + embed.add_field(name=f"Git", value=get_git_remote_url()) embed.add_field(name=f"OS", value=platform.platform()) await send_message(ctx, embed=embed)