Project config
makecord.json sits at the root of every project. This table is generated from the schema the runtime validates against.
| Field | Type | Default | Description |
|---|---|---|---|
specVersionrequired | 1 | — | Format version of the project files |
namerequired | string | — | Shown in the IDE |
runtime | string | "^0.1.0" | Semver range of @makecord/runtime the project targets |
intents | intent[] | ["Guilds"] | Gateway intents to request from Discord |
devGuildId | string | — | Register slash commands to this server only, so changes show up instantly |
plugins | string[] | [] | npm package names of plugins to load. The core plugin is always loaded |
secrets | string[] | ["DISCORD_TOKEN"] | Names of the secrets the bot expects. Values never live in the project |
cache | object | — | discord.js cache limits. Keeps memory flat in big servers |
cache.messages | number | 50 | Messages kept per channel |
cache.members | number | 200 | Members kept per server (the bot itself is always kept) |
cache.presences | number | 0 | Presences kept per server |
cache.reactions | number | 0 | Reactions kept per message |
cache.sweepIntervalSeconds | number | 3600 | Seconds between sweeps of messages older than 30 minutes. 0 turns sweeping off |
Example
Section titled “Example”{ "specVersion": 1, "name": "My bot", "runtime": "^0.1.0", "intents": ["Guilds", "GuildMembers"], "devGuildId": "123456789012345678", "plugins": [], "secrets": ["DISCORD_TOKEN"], "cache": { "messages": 50, "members": 200, "presences": 0, "reactions": 0, "sweepIntervalSeconds": 3600 }}