Skip to content

Add 6 new appealing slash commands to PN bot#14

Merged
TrivCodez merged 9 commits into
mainfrom
new-slash-commands
May 1, 2026
Merged

Add 6 new appealing slash commands to PN bot#14
TrivCodez merged 9 commits into
mainfrom
new-slash-commands

Conversation

@TrivCodez
Copy link
Copy Markdown
Contributor

🎉 New Slash Commands Added

This PR adds 6 new engaging and useful slash commands to the PN Discord bot, significantly expanding its functionality beyond the basic /hello and /echo commands.

📋 Command Summary

🔧 Utility Commands

  • /serverinfo - Display comprehensive server statistics (member counts, boost status, verification level, channels, roles, etc.)
  • /userinfo - Show detailed user information (account details, join date, roles, activity status, badges)
  • /avatar - Display user avatars at full resolution with download links
  • /ping - Check bot latency and performance metrics (websocket ping, API response time, uptime)

🎮 Fun & Interactive Commands

  • /8ball - Ask the magic 8-ball a question (20 classic responses with color-coded embeds)
  • /choose - Randomly select between 2-5 options for decision-making

🚀 Features

Follows existing architecture - Uses proper cog structure with discord.py application commands
Comprehensive documentation - Every command has detailed docstrings and usage examples
Clean embed design - All commands use rich embeds for professional appearance
Error handling - Robust error handling for edge cases and permission issues
Enhanced logging - Improved debug logging in bot.py for easier troubleshooting

📁 Files Changed

New Command Files:

  • slashcommands/serverinfo.py - Server statistics command
  • slashcommands/userinfo.py - User information command
  • slashcommands/avatar.py - Avatar display command
  • slashcommands/8ball.py - Magic 8-ball prediction command
  • slashcommands/choose.py - Random choice command
  • slashcommands/ping.py - Bot latency command

Modified Files:

  • bot.py - Updated to register all new commands, added member intents, enhanced error handling

🔍 Command Examples

Command Example Usage Description
/serverinfo /serverinfo Shows server stats and member info
/userinfo /userinfo @User Shows member's account and role info
/avatar /avatar @User Displays user's profile picture
/8ball /8ball "Will I win?" Gives random predictions
/choose /choose Pizza Burgers Tacos Randomly picks one option
/ping /ping Shows bot performance metrics

✅ Testing Checklist

  • All 6 new commands created with proper error handling
  • Commands registered in bot.py with proper cog loading
  • Documentation added for all commands with usage examples
  • Embeds designed for clean, professional appearance
  • Edge cases handled (DM contexts, missing permissions, etc.)
  • Branch properly synced and ready for merge

🎯 Why These Commands?

These commands provide real value to Discord users:

  • Utility: Server and user info help with moderation and community management
  • Engagement: 8-ball and choose commands encourage interaction and fun
  • Information: Avatar and ping commands provide useful technical information
  • Professional: Clean embeds and consistent design enhance user experience

🔐 Requirements Notes:

For full functionality of member-related commands (/userinfo, /avatar), ensure your bot has the "Server Members Intent" enabled in the Discord Developer Portal.


All commands follow the existing codebase patterns and are ready for production use!

@TrivCodez TrivCodez merged commit e234234 into main May 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant