Skip to main content

🔧 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"
Security Warning

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:

  1. Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
  2. Right-click on your server name
  3. 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"
Database Setup

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)