Build bots for Linkup

Moderation, games, welcome messages, slash commands. If you've made a Discord bot, this will feel familiar: apps, bot tokens, intents, slash commands and invite links.

Get a bot running in 3 steps

Needs Node.js 18 or newer. No packages to install.

1Create an app

In the Developer Portal, click New Application and copy the bot token it shows.

2Invite your bot

On the Installation tab, pick permissions and open the invite link, or add it straight to a server you manage.

3Run the code

Download the starter bot and run it with your token. It comes online and answers /ping, /echo and /roll.

Run it

# macOS / Linux
LINKUP_TOKEN=lu.your_token node starter-bot.js

# Windows PowerShell
$env:LINKUP_TOKEN="lu.your_token"; node starter-bot.js

Host your bot

Just like Discord, your bot is a small program you run yourself. It's online while it runs, and its slash commands come from your code.

AYour own PC

Easiest for testing. Run node bot.js and keep the window open. The bot goes offline when you close it or turn the PC off.

BA hosting service

For 24/7 bots. Upload bot.js to a Node.js host (Railway, Render, Fly.io, a VPS…), set LINKUP_TOKEN and LINKUP_URL as environment variables, and set the start command to node bot.js.

CAlways on, at home

Use a Raspberry Pi or a spare PC with pm2: npm i -g pm2, then pm2 start bot.js and pm2 save. It restarts on crashes and reboots.

Slash commands

Your bot registers its commands when it starts, with PUT /api/apps/{appId}/commands (the starter bot already does this). Change the list in your code and restart the bot to update them.

Build it with Claude

Let Claude (or another AI assistant) write your bot. It only needs the API reference below.

  1. Click Copy prompt for Claude. It copies the full Linkup API reference and the starter bot.
  2. Paste it into Claude and describe your bot after the prompt, for example "a bot that welcomes new members and has a /poll command".
  3. Save the code Claude gives you as bot.js and run it with your token. Never paste your token into a chat.
View API reference (text)

Quick reference

Full details in the API reference. Every request needs Authorization: Bot <token>.

RequestWhat it does
GET /api/bot/meYour app, bot user, servers and channels
GET /api/streamLive events. Your bot is online while it's connected.
POST /api/channels/{id}/messagesSend a message: {"content": "hi"}
GET /api/channels/{id}/messagesRead recent messages
PUT /api/messages/{id}/reactionsReact: {"emoji": "🔥"}
PUT /api/apps/{appId}/commandsRegister slash commands
POST /api/interactions/{id}/replyAnswer a slash command (optionally "ephemeral": true)

Privileged intents

IntentTurns on
Presencepresence events when members go online or offline
Server membersmember_join and member_leave
Message contentThe text of messages. Without it you still get DMs, your own messages and messages that @mention your bot.

Verification

Unverified bots can be in up to 100 servers. When yours grows, request verification on the Verification tab. Verified bots get a ✓ BOT tag.

Copied