Skip to main content

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.

Kojima Bot is a self-hosted Discord bot that turns any text channel into a real-time catch game: rarity-weighted entities spawn on a timer, and the first player to type the catch phrase or press the Catch button claims the prize. Beyond the core game, it ships a suite of casino minigames, an achievement system, auto-generated meme slash commands, social link-fixup for cleaner embeds, and keyword-triggered emoji reactions — all backed by Bun and a zero-dependency SQLite database, so it runs on any machine without an external database service.

Quickstart

Clone, configure, and launch Kojima Bot on your server in five steps.

Configuration

Every environment variable explained with types, defaults, and examples.

Spawn Game

How rarity tiers, catch triggers, and spawn intervals work.

Casino

Slots, coin flip, roulette, and the per-guild chip economy.

What’s included

Spawn Game Wild entities appear in your designated channel on a configurable timer. Each spawn is drawn from a pool of PNG assets in assets/images/spawn/, weighted by rarity tier so legendary cards are genuinely rare. Players claim a spawn by typing the catch phrase in the same channel or pressing the Catch button on the embed — first player wins. The spawn phrase is controlled by ENTITY_NAME and CATCH_TRIGGER, so you can reskin the entire game without touching source code. Timing is tunable per-server with /kojima interval. Casino minigames The /gamble command group offers three minigames: slots (spin a three-reel machine), coin flip (heads or tails), and roulette (bet on number, colour, or range). Every user has a chip balance scoped to each guild, so economies stay isolated across servers. Use /gamble balance to check your current chip total. Achievement system More than 20 milestones track activity across catches, gifts, and casino play. Achievements are viewable at any time with /kojima achievements and are stored per-user per-guild. The system rewards both luck (rare catches) and dedication (high catch counts), giving players long-term goals beyond the daily leaderboard. Meme commands Kojima Bot reads image and video files at startup and automatically registers a corresponding slash command for each one. Drop a file (PNG, JPG, GIF, WebP, BMP, or WebM) named mycommand.png into assets/images/meme/ and /mycommand becomes available after the next bun run deploy. No code changes are required — the command list grows with your asset library. Link fixup When LINK_FIXUP_X or LINK_FIXUP_INSTAGRAM is enabled, the bot watches for messages containing x.com, twitter.com, or instagram.com URLs. It deletes the original message and reposts it with the URLs rewritten to fixupx.com or vxinstagram.com respectively, producing rich video and photo embeds that Discord normally suppresses. This feature requires Manage Messages in the target channel. Word reactions Configured keywords in the source trigger automatic emoji reactions on matching messages. The reactions are added silently without interfering with the conversation, making it easy to inject personality into the server without additional commands or user friction.

Tech stack

LayerTechnology
RuntimeBun
Discord libraryDiscord.js v14
ORMDrizzle ORM
DatabaseSQLite (via better-sqlite3)
LanguageTypeScript

License

Kojima Bot is released under the GNU Affero General Public License v3.0 (AGPL-3.0). Any modifications you deploy — including running a modified version as a network service — must be made available under the same license. Review the LICENSE file in the repository before hosting a public instance.

Build docs developers (and LLMs) love