oh yeah
This commit is contained in:
parent
3c71e9f54e
commit
221f2370e4
5 changed files with 19 additions and 133 deletions
11
bot.py
11
bot.py
|
@ -481,6 +481,17 @@ 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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue