Minecraft Mod: Discord DM GUI
Create a fully working Minecraft client-side mod that allows players to connect their Discord account and send direct messages to their Discord friends through a GUI inside Minecraft.
Core Features
- Discord Account Login
- Add a "Connect Discord" button to the main mod GUI.
- Use Discord's official OAuth2 authorization flow.
- Open the authorization page in the player's default browser.
- Use a secure localhost callback or another supported secure callback method to finish authentication.
- Never ask users to enter their Discord password or 2FA code inside Minecraft.
- Store tokens securely and provide a logout/disconnect option.
- Main Discord GUI
Design a modern, polished GUI with a purple and black theme, rounded-looking panels, subtle animations, and clean typography.
Include:
- Discord account avatar and username.
- Friends and conversations sidebar.
- Search bar for conversations.
- Main chat panel displaying messages.
- Message input field at the bottom.
- Send button.
- Timestamps and message status indicators.
- Refresh and reconnect buttons.
- Clear error messages if Discord is disconnected or unavailable.
- Direct Messages
- Display existing conversations where officially supported.
- Show message history when authorized and available.
- Allow the player to type and send messages.
- Update conversations without freezing Minecraft.
- Support scrolling through chat history.
- Show loading indicators and handle network failures gracefully.
- Discord API Integration
- Use official Discord APIs and OAuth2.
- Respect Discord's permissions, scopes, rate limits, and terms of service.
- Do not use self-bots, user-token scraping, private undocumented endpoints, or automated control of the Discord client.
- Do not assume that OAuth2 login grants permission to read friends' DMs or send messages as a normal user.
- If Discord does not officially support a requested DM operation, explain the limitation and implement the closest compliant alternative, such as a Discord bot that can message users who have explicitly interacted with it where permitted.
- Technical Requirements
- Target Minecraft Java Edition 26.3, verifying the actual version and available mod loader APIs before implementation.
- Prefer Fabric if compatible with the target version.
- Use Java for the Minecraft mod unless the selected environment requires otherwise.
- Keep networking asynchronous so the game never freezes.
- Implement proper error handling, configuration, and secure credential storage.
- Include all required project files, dependencies, build configuration, and setup instructions.
- Make the mod client-side wherever technically possible.
- Security and Privacy
- Never upload Discord credentials to a third-party server.
- Never log access tokens or secrets.
- Validate the OAuth callback and use state/PKCE protections where applicable.
- Provide clear information about what account data the mod accesses.
- Keep secrets out of source code and GitHub repositories.
Final Deliverable
Produce the complete, compilable source project, not just a mockup. Include the full GUI implementation, authentication flow, API integration, configuration, error handling, and a README explaining how to build and install the mod.
Before implementing, clearly identify which requested Discord features are officially supported. Do not fake a successful login, fabricate messages, or claim that ordinary Discord friend DMs work if the API does not permit them.