Goal: Get the handler online without changing any framework code.
Download Node.js LTS. Then restart VS Code after installing.
You should see: index.js, app.js, config.json.
npm install
Copy your bot token + application (client) ID.
Open config.json and set:
{
"TOKEN": "PASTE_TOKEN_HERE",
"PREFIX": "!",
"APP_ID": "PASTE_CLIENT_ID_HERE",
"DEV_GUILD_ID": "PASTE_TEST_SERVER_ID"
}
Tip: DEV_GUILD_ID is the server you test commands in.
node index.js
Important: In this handler, index.js is the correct start point.
Use OAuth2 URL Generator → bot + applications.commands → give permissions → invite.
app.js instead of index.js.config.json.npm installnode index.js