This commit is contained in:
WhatDidYouExpect 2025-07-21 22:10:00 +02:00
parent 221f2370e4
commit ed53089d4a
2 changed files with 9 additions and 14 deletions

View file

@ -1,8 +1,7 @@
knockoff of genai basically :p 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 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) ![the goober](https://goober.whatdidyouexpect.eu/imgs/goobs/goobs.png)

18
bot.py
View file

@ -7,6 +7,7 @@ import traceback
import subprocess import subprocess
import tempfile import tempfile
import shutil import shutil
import psutil
import asyncio import asyncio
import platform import platform
import sys import sys
@ -219,6 +220,12 @@ async def talk(ctx: commands.Context, sentence_size: int = 5) -> None:
else: else:
await send_message(ctx, f"{(_('command_talk_generation_fail'))}") 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 # Command: Generate an image
@bot.hybrid_command(description=f"{(_('command_desc_help'))}") @bot.hybrid_command(description=f"{(_('command_desc_help'))}")
async def impact(ctx: commands.Context, text: Optional[str] = None) -> None: 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()) embed.add_field(name=f"OS", value=platform.platform())
await send_message(ctx, embed=embed) 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) # Command: Show bot statistics (admin only)
@bot.hybrid_command(description="stats") @bot.hybrid_command(description="stats")