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.

Niko reads all runtime configuration from a .env file located at src/.env. To get started, copy src/.env.example to src/.env and fill in the required values. Variables that are left blank or omitted entirely will fall back to their documented defaults.

Template

src/.env
DISCORD_BOT_TOKEN="the bot token goes here" # Required
DEBUG_MODE="False"
STATUS_MESSAGE='.help | "hey niko"'
STATUS_TYPE="playing" # Use: playing, watching, listening, competing, or streaming
STATUS_LINK="https://example.com" # Optional, use twitch or youtube for purple status icon (streaming only)
STATUS_DEVICE="normal" # Use: normal, embedded, desktop, vr, mobile_android, or mobile_ios
SLOTS_COOLDOWN="60" # Optional (Default=60)
BLACKJACK_COOLDOWN="60" # Optional (Default=60)
ROULETTE_COOLDOWN="60" # Optional (Default=60)
GELBOORU_API_KEY=""
GELBOORU_USER_ID=""
RULE34_API_KEY=""
RULE34_USER_ID=""
AI_INTEGRATIONS_OPENAI_BASE_URL=""
AI_INTEGRATIONS_OPENAI_API_KEY=""
HUGGINGFACE_API_KEY="" # Required for the .imagine and .edit commands
LOGGING_WEBHOOK="" # Optional (Not really recommended)
OXAPAY_API_KEY="" # Required for the donation commands to work, use the **Merchant Key** not the General or Payout keys
Never commit src/.env to version control. Your DISCORD_BOT_TOKEN grants full control of your bot. Make sure src/.env is listed in your .gitignore before pushing to any repository.
All values in the .env file must be strings. Wrap values in double quotes as shown in the template above — this is especially important for values that contain spaces, special characters, or the | pipe symbol.

Discord

DISCORD_BOT_TOKEN
string
required
Your bot’s token from the Discord Developer Portal. Navigate to your application → BotToken to copy it. This is the only truly required variable — the bot will refuse to start without it.

General Bot Behaviour

DEBUG_MODE
string
default:"False"
Set to "True", "1", or "yes" to enable verbose logging output. Useful during development; leave as "False" in production to keep your logs clean.
STATUS_MESSAGE
string
default:".help | \"hey niko\""
The text displayed in the bot’s Discord status. You can use any string here — for example "your next favourite bot".
STATUS_TYPE
string
default:"playing"
The activity type shown alongside STATUS_MESSAGE. Accepted values:
ValueDisplays as
playingPlaying <message>
watchingWatching <message>
listeningListening to <message>
competingCompeting in <message>
streamingStreaming <message> (uses STATUS_LINK)
A URL used when STATUS_TYPE is set to "streaming". For the purple streaming badge, this must be a Twitch (https://twitch.tv/...) or YouTube (https://youtube.com/...) URL. Has no effect for other status types.
STATUS_DEVICE
string
default:"normal"
Controls which presence device identity the bot reports to Discord. Accepted values:
ValueEffect
normalStandard bot presence
embeddedEmbedded/console device
desktopDesktop client presence
vrVR device presence
mobile_androidShows mobile indicator (Android)
mobile_iosShows mobile indicator (iOS)

Casino Cooldowns

These control how many seconds a user must wait between uses of each casino command. All three default to 60 seconds.
SLOTS_COOLDOWN
string
default:"60"
Seconds between slot machine uses per user. Set to "0" to disable the cooldown entirely.
BLACKJACK_COOLDOWN
string
default:"60"
Seconds between blackjack games per user. Set to "0" to disable the cooldown entirely.
ROULETTE_COOLDOWN
string
default:"60"
Seconds between roulette spins per user. Set to "0" to disable the cooldown entirely.

NSFW Image APIs

These variables unlock the NSFW image commands. Both the API key and the user ID must be set together for each service.
GELBOORU_API_KEY
string
Your Gelbooru API key. Obtain it from your Gelbooru account settings. Leave blank to disable Gelbooru image commands.
GELBOORU_USER_ID
string
Your Gelbooru numeric user ID. Found on the same account settings page as your API key.
RULE34_API_KEY
string
Your Rule34 API key. Leave blank to disable Rule34 image commands.
RULE34_USER_ID
string
Your Rule34 numeric user ID, paired with RULE34_API_KEY.

AI Integration

AI_INTEGRATIONS_OPENAI_API_KEY
string
required
The API key for your chosen AI provider. Required for all AI chat features (/chat, mention triggers, prefix AI commands). Works with any OpenAI-compatible provider — see the AI Providers page for the full list.
AI_INTEGRATIONS_OPENAI_BASE_URL
string
The base URL of an OpenAI-compatible API endpoint. Omit this variable (or leave it blank) to route requests to the official OpenAI API at https://api.openai.com. Set it to a third-party provider’s URL (e.g. https://openrouter.ai/api/v1) to use that provider instead. See AI Providers for a full list of compatible services and their base URLs.
HUGGINGFACE_API_KEY
string
required
A Hugging Face API token, required for the /imagine (image generation) and /edit (image editing) commands. Create a token at huggingface.co/settings/tokens. Without this key those two commands will not function, but all other features remain unaffected.

Logging

LOGGING_WEBHOOK
string
A Discord webhook URL. When set, Niko will forward internal log messages to that webhook channel. This is optional and not recommended for most deployments — the console output is generally sufficient.

Payments

OXAPAY_API_KEY
string
required
Your OxaPay Merchant Key (not the General Key or Payout Key). Required for the donation commands to create and verify payment sessions. Obtain it from your OxaPay merchant dashboard. Without this key, donation-related commands will be disabled.

Build docs developers (and LLMs) love