Overview
The SkyTeam Discord bot provides alliance members with automated notifications, server management tools, and integration with the ROBLOX platform. This guide walks through setting up and configuring the bot.Prerequisites
- Administrator access to your Discord server
- Node.js 18+ installed
- Basic command line knowledge
- Access to the SkyTeam source repository
Creating a Discord Application
Create Application
Go to the Discord Developer Portal and create a new application:
- Click “New Application”
- Name it “SkyTeam Bot” (or your preferred name)
- Accept the terms and create
Configure Bot Settings
Navigate to the “Bot” section:
- Click “Add Bot”
- Enable “Presence Intent”
- Enable “Server Members Intent”
- Enable “Message Content Intent”
- Save changes
Get Bot Token
In the “Bot” section:
- Click “Reset Token”
- Copy the token immediately (you won’t see it again)
- Store it securely for the next step
Never share your bot token publicly. Treat it like a password.
Installation
Configure Environment
Create a Replace the placeholder values with your actual credentials.
.env file in the root directory:.env.example
Invite Bot to Server
Generate an invite link with proper permissions:
- Go to OAuth2 > URL Generator in the Developer Portal
- Select scopes:
bot,applications.commands - Select permissions:
- Send Messages
- Embed Links
- Attach Files
- Read Message History
- Use Slash Commands
- Administrator (for setup commands)
- Copy the generated URL and open it
- Select your server and authorize
Bot Configuration
Core Settings
The bot is configured inapps/client/src/index.ts:
apps/client/src/index.ts
Activity Status
The bot sets a custom status on startup:apps/client/src/index.ts
Available Commands
The bot includes several built-in commands:Slash Commands
/ping
Tests bot responsiveness and displays latency:
apps/client/src/commands/public/ping.ts
/ping
Permissions: Available to all users
/setupchannel
Sets up pre-configured channel layouts for alliance information:
apps/client/src/commands/private/setupchannel.ts
/setupchannel (in a channel named portal or affiliates)
Permissions: Administrator only
Text Commands
The bot also supports prefix-based commands usingst!:
Error Handling
The bot includes comprehensive error handling:apps/client/src/index.ts
- Logged to the console
- Sent to users as ephemeral messages
- Include context (user, channel, timestamp)
Running the Bot
Creating Custom Commands
Add new slash commands by creating files inapps/client/src/commands/:
apps/client/src/commands/public/example.ts
apps/client/src/index.ts
Troubleshooting
Bot is offline
Bot is offline
- Verify
DISCORD_TOKENis correct in.env - Check that the bot process is running
- Ensure no other instances are using the same token
- Review console logs for connection errors
Slash commands not appearing
Slash commands not appearing
- Wait up to 1 hour for global commands to propagate
- Use guild-specific commands for instant updates
- Verify
DISCORD_HOME_GUILD_IDis set correctly - Re-invite the bot with the
applications.commandsscope
Permission errors
Permission errors
- Check bot role position in server settings
- Verify required permissions in OAuth2 invite
- Ensure channel-specific permissions aren’t blocking the bot
- Review
defaultMemberPermissionsin command definitions
Message content not received
Message content not received
- Enable Message Content Intent in Developer Portal
- Restart the bot after enabling intents
- Verify bot has permission to read messages
Security Best Practices
Token Security
- Never commit
.envfiles - Use environment variables in production
- Rotate tokens if compromised
- Limit bot permissions to minimum required
Command Permissions
- Use
defaultMemberPermissionsfor sensitive commands - Implement custom guards for additional checks
- Log administrative actions
- Rate limit user commands
Next Steps
API Integration
Connect your bot to the SkyTeam API
ROBLOX Setup
Integrate with ROBLOX games