All Kojima Bot configuration is driven by environment variables stored in aDocumentation 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.
.env file at the project root. On startup, src/config.ts loads this file via dotenv, validates the three required variables, and exports a typed CONFIG object that every module imports. There is no configuration UI or database-backed settings table — every knob is a variable in .env.
.env.example
Copy this file to .env and fill in your values before running bun start or bun run deploy:
Required variables
The bot token issued by the Discord Developer Portal. Navigate to your application → Bot tab → Token and click Reset Token to generate one. This value authenticates the bot with the Discord Gateway — guard it carefully and never share it publicly.
Your Discord application’s Application ID, found on the General Information tab of the Developer Portal. This is used when registering slash commands via
bun run deploy.The ID of the Discord server where slash commands are registered. Enable Developer Mode in Discord (User Settings → Advanced), then right-click your server and choose Copy Server ID. Guild-scoped commands appear instantly, unlike global commands which can take up to an hour to propagate.
Optional variables
The display name for spawned entities, used throughout bot messages and embeds (e.g. “A wild Kojima appeared!”). Change this to reskin the catch game without touching source code. When this variable is changed, also update
CATCH_TRIGGER if you have it set explicitly, or leave it unset to have the trigger derive automatically.The exact phrase players must type in the channel to catch a spawn. Defaults to the lowercase value of
ENTITY_NAME — so if ENTITY_NAME=Kojima, the trigger is kojima. Override this if you want the display name and catch phrase to differ, or if you want to use a phrase with spaces or special characters.When enabled, the bot watches for messages containing
x.com or twitter.com URLs. It deletes the original message and reposts it as **DisplayName** shared: <fixed URL> with the domain rewritten to fixupx.com, which produces rich video embeds that Discord normally suppresses for these domains.Requires Manage Messages and Send Messages permissions in every channel or thread where link fixup should apply.Accepted truthy values: true, 1, yes, on (case-insensitive). Any other value — including false — disables the feature.Same behaviour as
LINK_FIXUP_X, but for instagram.com URLs, which are rewritten to vxinstagram.com. Query strings are stripped from Instagram URLs during rewriting.Requires the same Manage Messages + Send Messages permissions as LINK_FIXUP_X.Accepted truthy values: true, 1, yes, on (case-insensitive).Path to the SQLite database file, relative to the project root. The file is created automatically on first run if it does not exist. Change this if you want to store the database on a different volume or keep multiple isolated instances on the same host.
How booleans are parsed
TheLINK_FIXUP_* variables are parsed by the envEnabled helper in src/config.ts. The raw string value is trimmed and lowercased, then compared against a fixed set of truthy tokens:
| Value | Result |
|---|---|
true | ✅ Enabled |
1 | ✅ Enabled |
yes | ✅ Enabled |
on | ✅ Enabled |
false | ❌ Disabled |
0 | ❌ Disabled |
no | ❌ Disabled |
| (empty / unset) | ❌ Disabled |
TRUE, Yes, and ON all enable the feature. Anything not in the truthy list evaluates to false — there is no error for an unrecognised value.