Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/developer51709/Niko/llms.txt

Use this file to discover all available pages before exploring further.

Get your own instance of Niko up and running in a few straightforward steps. Because Niko is fully self-hosted, you own every piece of the setup — your token, your AI provider, your data. The steps below take you from a fresh machine to an active bot in your Discord server.
1

Prerequisites

Before you begin, make sure you have the following ready:
  • Python 3.10 or higher installed on your machine. Verify with python --version.
  • A Discord account and a bot application created in the Discord Developer Portal.
  • A bot token copied from your application’s Bot page.
While on the Bot page, scroll down to Privileged Gateway Intents and enable all three:
IntentWhy Niko needs it
Message Content IntentRead message text for prefix commands and AI mentions
Server Members IntentTrack joins/leaves for onboarding, leveling, and logging
Presence IntentDisplay accurate member presence information
2

Clone the Repository

Clone the Niko source code and move into the project directory:
git clone https://github.com/developer51709/Niko.git && cd Niko
3

Install Dependencies

Install all required Python packages from the lockfile:
pip install -r requirements.txt
Key packages that will be installed:
PackagePurpose
discord.py>=2.7.1Discord gateway and slash-command framework
wavelinkLavalink client for music streaming
openaiOpenAI-compatible AI chat and image generation
pillowPIL image card rendering (economy, casino, music)
flaskStatic web server for the landing page
aiosqliteAsync SQLite for giveaway data
deep-translatorAutomatic EN / DE / ES translation
spotipySpotify metadata resolution
4

Configure Environment

Copy the example environment file to create your local configuration:
cp src/.env.example src/.env
Open src/.env and fill in at minimum the one required variable:
Required variables
# ── Required ─────────────────────────────────────────────────────────────
DISCORD_BOT_TOKEN="your-bot-token-here"
The following variables are optional but let you enable or customise features:
Optional variables
# AI provider — point to any OpenAI-compatible endpoint (OpenAI, Together, etc.)
AI_INTEGRATIONS_OPENAI_BASE_URL="https://api.openai.com/v1"
AI_INTEGRATIONS_OPENAI_API_KEY="your-ai-api-key-here"

# Required for the /imagine and /edit commands
HUGGINGFACE_API_KEY="your-huggingface-api-key-here"

# Bot presence shown in the Discord member list
STATUS_MESSAGE='.help | "hey niko"'
STATUS_TYPE="playing"          # playing | watching | listening | competing | streaming

# Enable verbose logging to the terminal
DEBUG_MODE="False"

# Required only if you want to enable donation commands
OXAPAY_API_KEY=""              # Use the Merchant Key — not General or Payout
5

Run the Bot

Start Niko from the repository root:
python src/bot.py
On the first run, Niko will:
  1. Connect to the Discord gateway using your token.
  2. Automatically discover and load all cogs from src/cogs/.
  3. Sync all 76 slash commands globally — this can take up to an hour to propagate across Discord’s infrastructure, though it is usually much faster.
Subsequent startups skip the full global sync, so they are significantly quicker.
6

Invite Niko to Your Server

Generate an invite URL from the Discord Developer Portal:
  1. Open your application → OAuth2URL Generator.
  2. Under Scopes, check bot and applications.commands.
  3. Under Bot Permissions, select the permissions your server needs (at minimum: Send Messages, Embed Links, Read Message History, Use Slash Commands, Connect, Speak for music).
  4. Copy the generated URL, open it in a browser, and select your server.
7

Verify It Works

Once Niko is online in your server, confirm everything is working:
  • Type /help to open the interactive help panel — this confirms slash commands synced correctly.
  • @mention Niko in any channel to start an AI conversation — this confirms your AI credentials are valid.
  • Run !levelpanel to open the leveling configuration dashboard for your server.
  • Run !automod to open the AutoMod setup panel and configure filters per-guild.

Hosting on Replit? You can run Niko without any local setup:
  1. Go to Replit and import the repository from https://github.com/developer51709/Niko.
  2. Open the Secrets tool (the padlock icon) and add DISCORD_BOT_TOKEN with your bot token as the value. Add AI_INTEGRATIONS_OPENAI_BASE_URL and AI_INTEGRATIONS_OPENAI_API_KEY for AI features.
  3. Click Run — Replit will install dependencies automatically and start the bot.
Music requires a Lavalink node. The /play command and all other music features connect to an external Lavalink server via wavelink. You will need to run your own Lavalink instance (or use a public node) and configure its host, port, and password before music commands will work.

Build docs developers (and LLMs) love