modified: bot.py

This commit is contained in:
SimolZimol
2025-08-19 19:16:16 +02:00
parent 02537b78d7
commit 098b4f13f6

139
bot.py
View File

@@ -1815,6 +1815,145 @@ async def owner_command(ctx):
except Exception as e:
await ctx.send(f"An error occurred while executing the command: {e}")
@client.hybrid_command()
async def help(ctx):
"""Shows all available user commands and their descriptions."""
embed = discord.Embed(
title="🤖 Bot Commands - User Guide",
description="Here are all the commands available to regular users:",
color=0x3498db,
timestamp=datetime.now()
)
# General Commands
embed.add_field(
name="🔧 General Commands",
value=(
"`/help` - Shows this help message\n"
"`/points` - Check your current points balance\n"
"`/level [user]` - View level and XP information\n"
"`/leaderboard` - View the server XP leaderboard\n"
"`/permissionlevel` - Check your permission level"
),
inline=False
)
# AI & Interaction Commands
embed.add_field(
name="🧠 AI & Interaction",
value=(
"`/askmultus <prompt>` - Ask Multus AI a question (costs 5 points)\n"
"`/vision <image_url>` - Analyze an image with AI\n"
"`/startlivechat` - Start live chat mode in channel\n"
"`/stoplivechat` - Stop live chat mode in channel"
),
inline=False
)
# Notes & Personal Data
embed.add_field(
name="📝 Notes & Personal Data",
value=(
"`/addnotes <type> <source>` - Add notes from text or URL\n"
"`/asknotes <question>` - Ask questions about your saved notes\n"
"`/delnotes` - Delete all your saved notes"
),
inline=False
)
# Giveaway Commands (if user has permission)
user_data = load_user_data_sync(ctx.author.id, ctx.guild.id)
if user_data["permission"] >= 5:
embed.add_field(
name="🎁 Giveaway Commands",
value=(
"`/startgiveaway <platform> <prize> <winners> <title> <subtitle> <duration>` - Create a giveaway"
),
inline=False
)
embed.set_footer(text="Use /modhelp for moderation commands (requires permission level 5+)")
await ctx.send(embed=embed)
@client.hybrid_command()
async def modhelp(ctx):
"""Shows all moderation commands (requires permission level 5 or higher)."""
user_data = load_user_data_sync(ctx.author.id, ctx.guild.id)
if user_data["permission"] < 5:
await ctx.send("❌ You need permission level 5 or higher to view moderation commands.")
return
embed = discord.Embed(
title="🛡️ Moderation Commands - Staff Guide",
description="Here are all the moderation commands available to staff members:",
color=0xe74c3c,
timestamp=datetime.now()
)
# Permission Level 5+ (Moderators)
embed.add_field(
name="👮 Moderator Commands (Level 5+)",
value=(
"`/warn <user> [reason]` - Warn a user\n"
"`/mute <user> <duration> [reason]` - Mute a user temporarily\n"
"`/unmute <user>` - Manually unmute a user\n"
"`/modstats [user]` - View moderation statistics"
),
inline=False
)
# Permission Level 8+ (Admins)
if user_data["permission"] >= 8:
embed.add_field(
name="👑 Admin Commands (Level 8+)",
value=(
"`/modconfig [setting] [value]` - Configure server moderation settings\n"
"`/addpoints <user> <amount>` - Add points to a user\n"
"`/resetpoints <user>` - Reset a user's points to 0\n"
"`/setlocalpermission <level>` - Set your local permission level"
),
inline=False
)
# Permission Level 10 (Owner)
if user_data["permission"] >= 10:
embed.add_field(
name="🔧 Owner Commands (Level 10)",
value=(
"`/shutdown_` - Shutdown the bot\n"
"`/owner_command` - Sync slash commands"
),
inline=False
)
# Moderation Configuration Help
embed.add_field(
name="⚙️ Moderation Configuration",
value=(
"Use `/modconfig` without parameters to see current settings.\n"
"Available settings: mute_role, mute_role_name, auto_create_mute_role,\n"
"max_warn_threshold, auto_mute_on_warns, auto_mute_duration,\n"
"log_channel, mod_log_enabled"
),
inline=False
)
# Duration Formats
embed.add_field(
name="⏱️ Duration Formats",
value=(
"When using mute commands:\n"
"`10m` = 10 minutes\n"
"`1h` = 1 hour\n"
"`2d` = 2 days"
),
inline=False
)
embed.set_footer(text=f"Your permission level: {user_data['permission']} | Use /help for user commands")
await ctx.send(embed=embed)
@client.hybrid_command()
async def askmultus(ctx, *, prompt: str):
"""Submits a prompt to Multus for assistance or information. (5 Points)"""