Kojima Bot is designed to go from zero to running in under ten minutes. You need two things before starting: the Bun runtime on your host machine and a Discord application with a bot token. Follow the steps below and you’ll have a live bot taking catches before your first coffee goes cold.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/noskap/kojima-bot/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Install Bun on your machine if you haven’t already:Then create a Discord application:
- Go to https://discord.com/developers/applications and click New Application.
- Give it a name, then navigate to the Bot tab.
- Click Reset Token to generate a bot token — copy it somewhere safe.
- Under Privileged Gateway Intents, enable Message Content Intent (required for catch-phrase detection).
- Note your Application ID from the General Information tab — this is your
CLIENT_ID. - Enable Developer Mode in Discord (User Settings → Advanced), then right-click your server and copy the Server ID — this is your
GUILD_ID.
Clone and install
Clone the repository and install dependencies with Bun:Bun reads
package.json and installs Discord.js v14, Drizzle ORM, dotenv, and the remaining dependencies into a local node_modules directory.Configure environment
Copy the example environment file and open it in your editor:The full contents of At minimum you must fill in the three required variables:
.env.example are:| Variable | Where to find it |
|---|---|
DISCORD_TOKEN | Discord Developer Portal → your app → Bot tab → Token |
CLIENT_ID | Discord Developer Portal → your app → General Information → Application ID |
GUILD_ID | Right-click your Discord server (Developer Mode on) → Copy Server ID |
Deploy slash commands
Register the bot’s slash commands to your guild:This runs
src/deploy-commands.ts, which calls the Discord REST API to register all commands scoped to the GUILD_ID from your .env. Guild-scoped registration takes effect instantly — no one-hour propagation delay. Re-run this command any time you add or rename a command.Start the bot
Launch Kojima Bot in production mode:Or start in watch mode during development (the process restarts automatically on file changes):You should see a ready log line in your terminal confirming the bot has connected to Discord. The SQLite database file (
bot.sqlite by default) is created automatically on first run.First steps in Discord
Once the bot is online, do the following in your Discord server:-
Invite the bot to your server with the required permissions. In the Discord Developer Portal, navigate to OAuth2 → URL Generator, select the
botandapplications.commandsscopes, then check the permissions listed in the next section. Open the generated URL in your browser to add the bot. -
Run
/kojima setupin the channel where you want entities to spawn. This opts the channel in to the spawn scheduler. You need Manage Channels permission to run this command. -
Wait for a spawn. An embed will appear with a spawn card and a Catch button. Type the catch phrase (default:
kojima, or whatever you set asCATCH_TRIGGER) or press the button — whichever comes first wins. -
Check the leaderboard with
/kojima leaderboardto see catch counts ranked across all players in the server.
Required bot permissions
Grant these permissions when inviting the bot, or set them on the individual channel via a channel-specific permission override:| Permission | Purpose |
|---|---|
| Send Messages | Post spawn embeds and command responses |
| Attach Files | Send the generated spawn card images |
| Embed Links | Render rich embed cards |
| Read Message History | Read context for catch detection |
| Add Reactions (optional) | Add a 😂 reaction on mistyped catch attempts |
| Manage Messages (if link fixup enabled) | Delete and repost messages with fixed URLs |