What is supported
- Node.js 22 or 24, chosen in the bot settings: discord.js, Sapphire and any npm module.
- npm, pnpm or yarn depending on your lockfile; native modules like SQLite (better-sqlite3) are built at install time.
- TypeScript:
npm run buildbefore starting, or the.tsfile run directly. - ffmpeg and libopus for
@discordjs/voice.
package.json and entry file
{
"name": "my-bot",
"main": "index.js",
"scripts": { "start": "node index.js" },
"dependencies": {
"discord.js": "^14.19.3",
"dotenv": "^16.5.0"
}
}require('dotenv').config();
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
client.once('ready', (c) => console.log(`Logged in as ${c.user.tag}`));
client.login(process.env.TOKEN);Invokara uses the start script if there is one, otherwise the main field, otherwise index.js, main.js, bot.js, src/index.js, index.ts…
pm2, several programs, subfolders
No need for pm2: the bot already restarts on its own. A "start": "pm2 start index.js" script is understood, and an ecosystem.config.js with several apps (the bot and its website, for example) starts them all together, with logs prefixed by their name.
A project inside a subfolder of the zip is detected: modules are installed and the bot starts from that folder.
An Express dashboard over HTTPS
Your bot can serve its own website: enable the web panel in Settings, set the port and listen on process.env.PORT. The mybot.invokara.cloud address (or your own domain) gets its HTTPS certificate, created and renewed automatically.
const express = require('express');
const app = express();
app.get('/', (req, res) => res.send('My bot is online!'));
app.listen(process.env.PORT || 3000, '0.0.0.0');0.0.0.0, not on localhost: otherwise the "This bot is offline" page shows up.The most common errors
Cannot find module 'xxx' | Add the module to the dependencies in package.json, then restart. If it is already there, your project is probably in a subfolder. |
Cannot use import statement outside a module | Add "type": "module" to package.json, or use require. |
Used disallowed intents | Enable the requested intents in the Bot tab of the Discord developer portal. |
JavaScript heap out of memory | Reduce caches (messages, members) or move to a bigger plan. |
Frequently asked questions
Which Node.js version is available?
Node.js 22 or 24, chosen in the bot settings.
Do I need pm2 to keep the bot online?
No: the bot restarts on its own after a crash. pm2 scripts and ecosystem.config.js files are understood.
How much RAM for a discord.js bot?
A small bot usually uses 60 to 150 MB: the Starter plan (256 MB) is enough to begin.
Can I deploy from GitHub?
Yes: link your repository and every push redeploys the bot. A version is kept before each deploy so you can roll back.
Sign in with Discord, then upload your project as is.