Bots Open Roar
New: Roar.js 1.0.0

Make a bot for Roar

Bots welcome people, answer commands, run games and keep servers tidy. Make one without writing code, or code your own in a few lines of JavaScript.

bot.js
import { Bot } from "roar.js";

const bot = new Bot({ token: process.env.ROAR_TOKEN });

// Someone says !ping: answer them.
bot.on("message", async (msg) => {
  if (msg.content === "!ping") await msg.reply("Pong! ๐Ÿ“");
});

// A slash command: /roll
bot.command("roll", "Roll a die", (i) => {
  const n = 1 + Math.floor(Math.random() * 6);
  return i.reply(`๐ŸŽฒ You rolled **${n}**`);
});

bot.start();

Three ways

Pick how you want to build โ€” you can switch later.

How it fits together

A bot is a program that listens and acts.

Your bot signs in with its own account. Roar tells it what happens (a message, a new member, someone using /roll) and the bot answers by sending messages, reacting or giving roles. How bots work โ†’

Your bot your PC or a server Roar node servers, channels, people People's apps desktop and browser events actions messages what people do "Bob said !ping" "Send Pong! in #general"

Ready-made

Bots you don't have to make.

Every node comes with two verified bots. Add them from Server Settings โ†’ Bots in one click.

๐Ÿ‘‹

Welcomer

Greets new members in a channel or by DM, and can give them a role. You write the message: Welcome to {server}, {user}!

โญ

Levels

Gives XP for chatting, announces level-ups, and answers /rank and /leaderboard.

๐Ÿงฉ

Examples to copy

Dice, reaction roles, a welcomer, server info cards, reminders and a webhook script, all ready to run.

See the examples โ†’

Questions

Good to know

Do I need to know how to code?

No. Bot Builder makes bots from rules you click together in the desktop app. When you want more, Roar.js takes a few lines of JavaScript, and the first-bot guide walks you through every step.

Does it cost anything?

Making bots with Roar.js and webhooks is free. Bot Builder is a Roar Plus perk. Your bot runs on your own computer (or any server you have), so there's nothing to pay Roar for.

Where does my bot run?

On whatever computer runs its code: your PC while you test, then something that stays on, like a spare PC, a Raspberry Pi or a small server. When the program stops, the bot goes offline. A Bot Builder bot runs inside your Roar app while it's open.

Can I use a Discord bot library?

Not as is. Roar's API is shaped like Discord's, but the addresses, the connection and some details differ (there are no intents, buttons or RESUME). The differences are listed here. Roar.js is made for Roar and feels familiar if you know discord.js.

Can bots work on other nodes, not just the official one?

Yes. Anyone can host a Roar node, and a bot can join any node it has an account on: give Roar.js the node's id or address. Which node โ†’