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’s AI system is powered by any OpenAI-compatible API provider — configure your own key and base URL in .env to point it at any compatible model host (OpenAI, Groq, a local Ollama proxy, etc.). You can trigger a conversation in three ways, and every response is shaped by trilingual auto-detection (English, German, Spanish), a rolling short-term memory of the last 3 turns, and a per-user favorability score that subtly shifts Niko’s tone based on your interaction history.
Triggering AI Chat
There are three ways to start a conversation with Niko:
- @mention the bot —
@Niko hey, what's up?
- Prefix command —
!ai what's the weather like?
- Say “niko” in a message in any channel where Niko is active — Niko will pick it up naturally and respond.
Niko automatically detects the language of your message and replies in English, German, or Spanish accordingly.
Personalities
Server admins can choose between two AI personalities using /ai-config. The personality affects Niko’s vocabulary, tone, and response style across all AI commands.
cafe mode
Niko acts as a warm, cozy café-barista friend. Responses use lowercase, soft emoji (☕ ✨ 🍪), casual Discord slang (ngl, fr, omg, bruh), cute kaomojis, and short 1–2 sentence replies. Every interaction feels like chatting across a café table — never formal, never robotic.
Example response: "omg no way, that's actually so cute lmao ☕✨"
normal mode
Niko acts as a knowledgeable, professional-but-approachable assistant. Responses are clear, direct, and appropriately scoped in length — short for quick questions, more thorough for complex ones. Emoji are used sparingly. Filler phrases like “Certainly!” or “Of course!” are avoided.
Example response: "Good question. Here's what I know about that — [concise answer]."
Favorability System
Every user has a favorability score stored in memory.json, keyed by their Discord User ID. This score changes how Niko perceives and responds to you:
| Score range | How Niko sees you |
|---|
| > 15 | One of Niko’s absolute favorites |
| > 8 | Niko likes you a lot |
| > 3 | Niko has a good impression of you |
| > 0 | Niko is warming up to you |
| 0 or below | Niko doesn’t know you well yet |
The score increases by 1 each time Niko successfully replies to you. Check your current score with !favor.
AI Commands
| Command | Description |
|---|
!favor [member] | Check your favorability score with Niko. Pass an optional member to check someone else’s score. Prefix command only. |
!memory [member] | View the long-term memory notes Niko has recorded about you (or another user). Prefix command only. |
!clearhistory or /clearhistory | Erase your full conversation history and long-term memory with Niko. Also resets your favorability score. Runs as an ephemeral (private) response. Aliases: !clearchat, !resetmemory. |
!generate <prompt> | Generate an AI image from a text prompt using the Pollinations.ai API. Aliases: !imagen, !imagine. Premium users only. |
/ai-config | (Admin — requires Manage Server) Open the AI configuration panel to toggle the AI on/off, set the personality, and manage experiments. Also available as !ai-config. |
!generate uses the Pollinations.ai image API, which does not require an API key. The HUGGINGFACE_API_KEY environment variable is only needed for the experimental AI image editing feature (!edit), which is currently disabled pending a reliable implementation.
If Niko’s responses seem off-topic or confused about something you said earlier, run !clearhistory (or /clearhistory) to wipe your short-term conversation history and long-term memory. This gives Niko a completely fresh start with you.
Memory System
Niko maintains two layers of memory per user, both stored in memory.json on disk and keyed exclusively by Discord User ID (never by username).
Short-term conversation history
The last 3 turns (your messages plus Niko’s replies) are included as context in every AI request. This allows Niko to follow the thread of a conversation without you having to re-explain yourself.
Long-term memory
As you chat, Niko accumulates a running log of everything you’ve said — a plain-text string that is truncated to the most recent 300 characters before being passed to the model. This is used to carry context across separate conversations (e.g. Niko remembering your name, preferences, or past topics).
Clearing memory
Use !clearhistory (also aliased as !clearchat and !resetmemory, or /clearhistory as a slash command) to permanently erase:
- Your short-term conversation history
- Your long-term memory notes
- Your favorability score
The command confirms with a green panel on success, or a yellow panel if you have no history to clear.
AI Experiments & Configuration
The /ai-config panel (admin-only, requires Manage Server) exposes two experimental features that can be toggled independently per server. Both affect how much context is sent to the AI model per message.
Better Context
Gives Niko awareness of the last 5 non-bot messages in the channel and the content of any message being replied to, so responses feel more connected to the flow of conversation.
- Additional token cost: ~550 input tokens per message
AI Actions
Allows Niko to perform real Discord actions when asked in natural language — such as creating polls, kicking or banning members, managing channels and roles, or changing nicknames. Before any action executes, Niko shows a confirmation card with the exact action and waits for the requesting user to click Confirm or Cancel.
Actions require both the user and Niko to hold the relevant Discord permission (Kick Members, Ban Members, Moderate Members, Manage Messages, Manage Channels, Manage Roles, Manage Nicknames).
- Additional token cost: ~900 input tokens (only on messages that contain action-intent keywords; casual chat is unaffected)
Combined token budget
| Experiment combination | Approx. input tokens per message |
|---|
| Neither | Baseline (short-term history + memory + system prompt) |
| Better Context only | +~550 |
| AI Actions only | +~900 (action-intent messages only) |
| Both enabled | +~1,050 |
These figures are approximate and vary with message length and memory size.