Add 6 new appealing slash commands to PN bot#14
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎉 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
/helloand/echocommands.📋 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.pyapplication 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 commandslashcommands/userinfo.py- User information commandslashcommands/avatar.py- Avatar display commandslashcommands/8ball.py- Magic 8-ball prediction commandslashcommands/choose.py- Random choice commandslashcommands/ping.py- Bot latency commandModified Files:
bot.py- Updated to register all new commands, added member intents, enhanced error handling🔍 Command Examples
/serverinfo/serverinfo/userinfo/userinfo @User/avatar/avatar @User/8ball/8ball "Will I win?"/choose/choose Pizza Burgers Tacos/ping/ping✅ Testing Checklist
🎯 Why These Commands?
These commands provide real value to Discord users:
🔐 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!