Events Guide¶
Arcane events are JSON files in events/ and map to Discord event names.
Minimal Schema¶
event(required, e.g.ready,guildMemberAdd)enabled(boolean)once(boolean, optional)package(nullor package name)config(event-specific settings)response(optional response payload for core event handling)
Example¶
{
"event": "ready",
"enabled": true,
"once": true,
"package": null,
"config": {
"console": {
"message": "{{bot.tag}} online and listening"
}
},
"response": {
"type": "message",
"content": "Bot started at {{guild.name}}"
}
}
Core Runtime Behavior¶
- If
packageis set and loaded, Arcane callsexecuteEvent(eventConfig, args, context). - If no package is set, Arcane can:
- log
config.console.message - send
responsetoconfig.channelId(if provided) or inferred event channel once: truebinds withclient.once(...); otherwise Arcane binds a persistent listener.
Best Practices¶
- Keep event names aligned with Discord.js naming.
- Disable events you are not using (
"enabled": false). - Prefer package-based event handling for complex workflows.
- Add channel IDs as strings when using
config.channelId.