Skip to content

Add /profile slash command with rich Discord embeds #343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 21, 2025

This PR implements a new /profile slash command that displays user profile information using rich Discord embeds, providing a modern alternative to the existing image-based !profile command.

Features

  • Modern Interface: Uses Discord's slash command system for better UX
  • Rich Embeds: Beautiful, organized display with user avatars and role colors
  • Comprehensive Data: Shows all profile information including:
    • User info (username, display name, main role)
    • Level & XP (total, current progress, percentage, rank)
    • Karma statistics (total, weekly, monthly, given, rank)
    • Optional location display if DefaultCity is set
  • Flexible Usage:
    • /profile - Shows your own profile
    • /profile @user - Shows another user's profile
  • Error Handling: Graceful handling of missing user data

Example Usage

🎮 JohnDoe's Profile                    [Avatar]
────────────────────────────────────────────────

👤 User Info
Username: JohnDoe
Display Name: John Developer  
Main Role: Unity Developer

📈 Level & Experience          ⭐ Karma
Level: 25 (Rank #47)          Total Karma: 156 (Rank #23)
Total XP: 45,687              Weekly: 12
Current Level XP: 1,234/2,890 Monthly: 45
                              Karma Given: 89

Technical Implementation

  • Added to UserSlashModule.cs following existing patterns
  • Reuses existing database queries and user data models
  • Includes proper dependency injection and error handling
  • Future-ready with placeholder for achievement system (issue Achievement/Badge System #341)

Benefits

✅ Instant display (no image generation time)
✅ Accessible and copy-paste friendly
✅ Lower server resource usage
✅ Works on all Discord clients
✅ Complements existing !profile command

Fixes #342.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits July 21, 2025 13:40
Co-authored-by: Pierre-Demessence <1756398+Pierre-Demessence@users.noreply.github.com>
Co-authored-by: Pierre-Demessence <1756398+Pierre-Demessence@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] /profile command in Embed Add /profile slash command with rich Discord embeds Jul 21, 2025
@Copilot Copilot AI requested a review from Pierre-Demessence July 21, 2025 13:43
Copilot finished work on behalf of Pierre-Demessence July 21, 2025 13:43
@Pierre-Demessence
Copy link
Member

/deploy_dev

Copy link

🚀 Starting deployment of Unity-Developer-Community/UDC-Bot:copilot/fix-342 to development...

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.

/profile command in Embed
2 participants