đ§ Basic Settings
The Basic Settings section contains the core configuration required for TKI Auth to function properly. These settings must be configured before running the bot.
Configuration Overviewâ
BasicSettings:
Token: "your-bot-token-here"
GuildID: "1251428989151481876"
MongoURI: "mongodb+srv://username:password@cluster.mongodb.net/"
ShowStats: false
Setting Detailsâ
Tokenâ
Type: string
| Required: Yes
Your Discord bot token from the Discord Developer Portal. This is required for the bot to connect to Discord.
Token: "EXAMPLE_TOKEN"
Never share your bot token publicly! Keep this token secure and never commit it to public repositories.
GuildIDâ
Type: string
| Required: Yes
The Discord server (Guild) ID where the bot will operate. The bot will only function in this specific server.
GuildID: "EXAMPLE_GUILDID"
How to get Guild ID:
- Enable Developer Mode in Discord (User Settings â Advanced â Developer Mode)
- Right-click on your server name
- Select "Copy Server ID"
MongoURIâ
Type: string
| Required: Yes
The MongoDB connection string for database access. TKI Auth uses MongoDB to store licenses, products, statistics, and other data.
MongoURI: "mongodb+srv://username:password@cluster.mongodb.net/?retryWrites=true&w=majority"
Make sure your MongoDB database is accessible and the provided credentials have read/write permissions. TKI Auth will automatically create the necessary collections.
ShowStatsâ
Type: boolean
| Required: No | Default: false
Controls whether the bot displays startup statistics in the console when it starts up.
ShowStats: true # Shows stats at startup
ShowStats: false # Hides stats at startup
When enabled, displays:
- Total products count
- Total licenses count
- Total requests count
- Successful requests count
- Rejected requests count
Example Configurationâ
BasicSettings:
Token: "MTM3oJpk0OTIyNzk2NzYxdwd0p.GMpyTS.oT9cE2fuJlNG9w29Q0aEMfI_s7a3_2p0DxkV_0"
GuildID: "1451448939151481876"
MongoURI: "mongodb+srv://tki-user:mySecurePassword@tki-cluster.mongodb.net/tki-auth?retryWrites=true&w=majority"
ShowStats: true
Troubleshootingâ
Common Issuesâ
Bot won't start:
- Verify the token is correct and the bot is created in Discord Developer Portal
- Ensure the bot has been added to your server with proper permissions (use Adminstrator to be safe)
- Check that the Guild ID matches your Discord server
Database connection failed:
- Verify MongoDB URI format and credentials
- Ensure your IP is whitelisted (for MongoDB Atlas)
Permission errors:
- Make sure the bot has necessary permissions in your Discord server
- Verify the bot role is positioned correctly in the role hierarchy
Required Bot Permissionsâ
Your Discord bot needs these permissions:
- Send Messages - To send responses and logs
- Use Slash Commands - For command functionality
- Manage Roles - To assign client roles (if enabled)
- Read Message History - For proper command handling
- Create Public Threads - For Advanced Logging (if enabled)