From ed53089d4a1c30db96ecd1abee6a7b08d5354950 Mon Sep 17 00:00:00 2001 From: WhatDidYouExpect <89535984+WhatDidYouExpect@users.noreply.github.com> Date: Mon, 21 Jul 2025 22:10:00 +0200 Subject: [PATCH] :p --- README.md | 5 ++--- bot.py | 18 +++++++----------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index dc1f094..ae744a6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ knockoff of genai basically :p - +not that hard to setup just modify the .env and install packages and youre rollin +maybe also create custom commands (you put them in the cog folder its just drap and drop) Special thanks to [Charlie's Computers](https://github.com/PowerPCFan) for being the only one I know of that's hosting Goober 24/7 -[Goober Central](https://github.com/whatdidyouexpect/goober-central) - ![the goober](https://goober.whatdidyouexpect.eu/imgs/goobs/goobs.png) diff --git a/bot.py b/bot.py index ac5897d..12d3d87 100644 --- a/bot.py +++ b/bot.py @@ -7,6 +7,7 @@ import traceback import subprocess import tempfile import shutil +import psutil import asyncio import platform import sys @@ -219,6 +220,12 @@ async def talk(ctx: commands.Context, sentence_size: int = 5) -> None: else: await send_message(ctx, f"{(_('command_talk_generation_fail'))}") +@bot.hybrid_command(description=f"RAM") +async def ramusage(ctx): + process = psutil.Process(os.getpid()) + mem = process.memory_info().rss + await send_message(ctx, f"Total memory used: {mem / 1024 / 1024:.2f} MB") + # Command: Generate an image @bot.hybrid_command(description=f"{(_('command_desc_help'))}") async def impact(ctx: commands.Context, text: Optional[str] = None) -> None: @@ -481,17 +488,6 @@ async def about(ctx: commands.Context) -> None: embed.add_field(name=f"OS", value=platform.platform()) await send_message(ctx, embed=embed) -@bot.hybrid_command(description="balls") -async def countUser(ctx, user: discord.User = None): - user = user or ctx.author - user_id = str(user.id) - - with open(MEMORY_FILE, 'r') as f: - data = json.load(f) - - count = sum(1 for entry in data if '_meta' in entry and entry['_meta'].get('user_id') == user_id) - - await ctx.send(f"User {user.display_name}'s ID appears {count} times in the memory file.") # Command: Show bot statistics (admin only) @bot.hybrid_command(description="stats")