Skip to main content
Home
This package has been archived, and as such it is read-only.

Built and signed on GitHub Actions

A library for creating bots for the Meower platform.

This package works with Deno, Bun, Browsers
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
6 months ago (1.8.2)

RoarBot is a library for creating bots for the Meower platform. It comes with an easy way to connect to Meower and parse commands.

Note

Make sure to always use await when possible within commands in order for potential errors to not make your bot crash.

const bot = new RoarBot();
bot.command("greet", {
  description: "Greet someone!",
  args: [
    { name: "whom", type: "string" },
    { name: "greeting", type: "full" },
  ],
  fn: async (reply, [whom, greeting]) => {
    await reply(`${greeting || "Hello"}, ${whom}!`);
  },
});
bot.login("BearBot", "········");

// @BearBot help
// @BearBot greet Josh
// @BearBot greet Josh Hello there
const bot = new RoarBot();
bot.run(
  import("./commands/add.ts"),
  import("./commands/ping.ts"),
);
bot.login("BearBot", "········");

// ==== ./commands/add.ts ====
import type { RoarBot } from "../mod.ts";

export default (bot: RoarBot) => {
  bot.command("add", {
    args: ["number", "number"],
    fn: async (reply, [n1, n2]) => {
      await reply((n1 + n2).toString());
    },
  });
};

// ==== ./commands/ping.ts ====
import type { RoarBot } from "../mod.ts";

export default (bot: RoarBot) => {
  bot.command("ping", {
    args: [],
    fn: async (reply) => {
      await reply("Pong");
    },
  });
};
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@mbw/roarbot

Import symbol

import * as roarbot from "@mbw/roarbot";
or

Import directly with a jsr specifier

import * as roarbot from "jsr:@mbw/roarbot";

Add Package

bunx jsr add @mbw/roarbot

Import symbol

import * as roarbot from "@mbw/roarbot";