Phase 7 of TEAMS.md. `api.registerSlashCommands` stops throwing: a module registers a command's DEFINITION and its HANDLER together, the bot pulls the definitions over the internal listener and runs none of our code, and the handler executes here — forced by the bot container having no `modules` volume, and the right boundary anyway. Registration validates what Discord would reject as a batch (names, description lengths, the four option types, required-before-optional), because the bot registers the whole set in one PUT and a single bad entry costs every command including the bot's own. Commands are not namespaced under their owner — there is no dot in Discord's name grammar — so collisions are first-come with the holder named. The dispatcher is the access boundary: `linked` has no Discord equivalent, so the platform-side permission default can only ever be advertising. It resolves the actor by `auth_providers.kind` rather than the id slug, treats a banned account as unlinked, bounds a handler under the bot's own timeout, and keeps `ok` outside the envelope so a handler cannot forge it. Liveness is asked at both the pull and the dispatch. The registries have no removal path, so a module an operator disables at runtime would otherwise keep a live handler behind a command Discord still advertises. Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
603 B
JSON
26 lines
603 B
JSON
{
|
|
"name": "runic-gateway-bot",
|
|
"version": "1.0.0",
|
|
"description": "Discord bot for the Runic Gateway community server",
|
|
"private": true,
|
|
"main": "src/server.js",
|
|
"scripts": {
|
|
"start": "node src/server.js",
|
|
"test": "node --test test/*.test.js",
|
|
"dev": "nodemon src/server.js"
|
|
},
|
|
"keywords": ["discord", "discord.js"],
|
|
"author": "whitlocktech",
|
|
"license": "ISC",
|
|
"dependencies": {
|
|
"discord.js": "^14.16.3",
|
|
"dotenv": "^16.4.5",
|
|
"express": "^4.19.2",
|
|
"mariadb": "^3.3.1",
|
|
"node-cron": "^3.0.3"
|
|
},
|
|
"devDependencies": {
|
|
"nodemon": "^3.1.4"
|
|
}
|
|
}
|