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 requires three privileged intents to be enabled in the Discord Developer Portal before it can run correctly. Without them, AI chat, moderation, onboarding, and several other core features will silently fail or refuse to start. Privileged intents are disabled by default for all new bots and must be manually toggled on in your application settings at discord.com/developers/applications → select your application → BotPrivileged Gateway Intents.

Required Intents

Why Niko needs this: Niko reads the raw text of messages for a wide range of features. Without this intent, Discord does not send message content to bots in guilds with more than 100 members, so all of the following features stop working entirely.
FeatureHow message content is used
AI chatMessages containing “niko”, a @mention, or the bot prefix are forwarded to the configured LLM to generate a conversational reply
AI prefix commands (!ai <text>)The text after the prefix is extracted from the message and sent to the LLM
AutoModMessages are scanned for spam patterns, banned words, excessive mentions, and external links according to per-server configuration
HighlightsMessages are scanned for keywords registered by users; matching messages trigger a DM notification
SnipeThe content of the most recently deleted or edited message in a channel is temporarily cached so users can retrieve it with !snipe (cache is cleared on restart)
Leveling (XP)The presence of any message in a guild channel increments the author’s XP; the content itself is not stored
AFK detectionMessages are scanned for @mentions of AFK users to send a notification
UwU LockMessages in UwU-locked channels are deleted and re-sent in uwu-fied form
TagsMessages starting with a configured tag trigger are matched by prefix
All prefix commandsEvery text-based (prefix) command requires reading message content to parse the command name and arguments
Is message content stored permanently?No, with two narrow exceptions:
  • AI conversation history — the last 3 message exchanges per user are kept in memory.json to give the LLM short-term context. Users can erase this at any time with /clearhistory.
  • Snipe cache — one deleted/edited message per channel is held in memory and cleared every time the bot restarts.
Why Niko needs this: The Server Members intent gives Niko access to on_member_join events and the ability to resolve full Member objects (which include roles, join dates, and booster status). Without it, the following features break.
FeatureHow member data is used
Welcome / onboardingon_member_join fires the welcome message, agreement gate, and role menu
Leveling role rewardsWhen a user reaches a configured level, their Member object is fetched to assign the reward role
Economy commandsBalance lookups, leaderboards, and rob/give commands resolve Member objects
Birthday announcementsThe daily birthday task iterates guild members to check who has a birthday today
Giveaway requirementsJoin requirements (account age, server age, booster status) are checked against the Member object
Anti-raid / raid detectionon_member_join is used to track join velocity for raid protection; join timestamps are compared
ModerationKick, ban, timeout, and warning commands operate on Member objects
Member count display!serverinfo and the now-playing card display guild member counts
Highlights DMThe highlights listener needs to resolve the member who set the keyword to send them a DM
Is member data stored permanently?Only User IDs are stored — as keys in JSON data files — to associate per-user records (economy balance, XP, reminders, warnings, etc.) with the correct person. No usernames, display names, avatars, or join metadata are ever written to disk.
Why Niko needs this: The Presence intent lets Niko read a member’s current online status in real time. It is used by a small number of display commands.
FeatureHow presence data is used
!userinfoDisplays a member’s current online / offline / DND / idle status
!spotifyReads the member’s current Spotify presence to display the track they are listening to
Member count calculationsSome member-count displays use presence data to distinguish online members from offline ones
Is presence data stored permanently?No. Presence data is read in real time at the moment a command is invoked and is never written to disk.

Setup Checklist

Follow these steps to enable all three intents in the Developer Portal.
1

Open the Developer Portal

Go to discord.com/developers/applications and select your bot’s application.
2

Navigate to the Bot page

In the left sidebar, click Bot.
3

Enable MESSAGE CONTENT INTENT

Scroll to the Privileged Gateway Intents section and toggle on MESSAGE CONTENT INTENT.
4

Enable SERVER MEMBERS INTENT

Toggle on SERVER MEMBERS INTENT directly below the previous toggle.
5

Enable PRESENCE INTENT

Toggle on PRESENCE INTENT.
6

Save your changes

Click the Save Changes button at the bottom of the page. All three toggles should now show as enabled (green).
7

Copy your bot token

While you are on this page, click Reset Token (or Copy if visible) to get a fresh token, then paste it into DISCORD_BOT_TOKEN in your src/.env.
If you click Reset Token, Discord immediately invalidates your old token and your bot will go offline until you update DISCORD_BOT_TOKEN in src/.env with the newly generated value. Always update your .env immediately after regenerating.

Build docs developers (and LLMs) love