Overview
Stiletto integrates with Discord to provide authentication and enhanced clan management features. By connecting your Discord account, you can create clans, manage members, and integrate the Stiletto Discord bot with your server.How Discord Integration Works
Stiletto uses Discord OAuth2 to authenticate users. The authentication flow:- User clicks “Login with Discord” button
- Redirects to Discord’s authorization page
- Discord redirects back to Stiletto with an authorization code
- Stiletto exchanges the code for user information and creates a session token
- User is authenticated and can access protected features
OAuth2 Configuration
The Discord OAuth2 integration requires:- Client ID: Set via
VITE_DISCORD_CLIENT_IDenvironment variable - Redirect URI:
{your-domain}/profile - Scopes:
identifyandguilds
Connecting Your Discord Account
Step 1: Navigate to Profile
Go to the Stiletto website and click the Login with Discord button in the navigation menu or visit/profile directly.
Step 2: Authorize Stiletto
You’ll be redirected to Discord’s authorization page. Click Authorize to grant Stiletto access to:- Your Discord identity (username and ID)
- Your Discord guild (server) list
Step 3: Complete Setup
After authorization, you’ll be redirected back to Stiletto and automatically logged in. You can now:- Set your in-game nickname
- Create or join a clan
- Access clan management features
Features Requiring Discord Authentication
The following features are only available to authenticated Discord users:Profile Management
Once connected, you can manage your profile at/profile:
- View your Discord tag
- Set your in-game nickname
- Change language preferences
- Delete your account
Clan Creation and Management
Authenticated users can:- Create a new clan: Only available to users without a clan
- Join an existing clan: Browse clan list and request to join
- Manage clan members: Add, remove, or update member permissions (clan leaders only)
- Leave a clan: Members can leave at any time (except clan leaders)
Resource Maps
Create and share interactive resource maps with your clan:- Create private maps with password protection
- Add markers for resources, bases, and points of interest
- Share map links with your clan members
Trading System
Post trade offers to the community:- Create trade listings for items
- View and search available trades
- Delete your own trade listings
Diplomacy Management
Manage your clan’s relationships with other clans:- Mark clans as Allies, Enemies, or NAP (Non-Aggression Pact)
- View your clan’s diplomatic relationships
- Remove relationships when needed
Discord Bot Integration for Clans
Clan leaders can integrate the Stiletto Discord bot with their Discord server to automatically sync walker data and enable additional features.Bot Features
- Walker Tracking: Automatically collect and display your clan’s walkers
- Discord Server Integration: Link your clan to a specific Discord server
- Automated Updates: Keep walker information synchronized
Configuring the Discord Bot
Clan leaders can configure bot settings through the clan management interface:Bot API Endpoints
Get Discord bot configuration for a clanAuthentication: Required (Bearer token)Response:
Update Discord bot configurationAuthentication: Required (Bearer token)Query Parameters:
guildid(optional): Discord server IDdiscordid(optional): Bot user ID
User Workflows
First-Time User Setup
- Visit Stiletto website
- Click Login with Discord
- Authorize Stiletto on Discord
- Get redirected to profile page
- Set your in-game nickname
- Create a clan or join an existing one
Clan Leader Workflow
- Log in with Discord
- Create a new clan (or become clan leader)
- Configure clan settings
- Integrate Discord bot (optional)
- Manage members and permissions
- Set up diplomatic relationships
- Share resource maps with clan
Clan Member Workflow
- Log in with Discord
- Browse clan list at
/clanlist - Request to join a clan
- Wait for clan leader approval
- Access clan resources and maps
- View clan walkers and tech tree
Session Management
Stiletto maintains user sessions using tokens stored in the browser:Authorization header:
Disconnecting Your Account
To disconnect your Discord account and delete all your data:- Go to your profile page at
/profile - Scroll to the bottom
- Click Delete User
- Confirm the deletion
Troubleshooting
”Login Again” Error
If you see an error asking you to log in again:- Your session token may have expired
- Clear your browser cache and log in again
- Check that you’re using the same Discord account
Authorization Failed
If Discord authorization fails:- Ensure you clicked Authorize on the Discord page
- Check that Stiletto has the correct Discord Client ID configured
- Try logging out of Discord and back in
- Verify your Discord account is in good standing
Can’t Create or Join Clan
If you can’t create or join a clan:- Ensure you’re logged in with Discord
- Verify you don’t already belong to a clan (you must leave first)
- Check that you’ve set your in-game nickname
- Contact the clan leader if joining a private clan
Privacy and Security
Stiletto only requests the minimum Discord permissions needed:- identify: To get your Discord username and ID
- guilds: To see which Discord servers you’re in (for bot integration)
- Read your Discord messages
- Access your Discord friends list
- Post messages on your behalf
- Access any other Discord data
Related Documentation
- API Reference - Complete API documentation
- Clan Management - Detailed clan features
- Environment Variables - Configuration options