This package has been archived, and as such it is read-only.
Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
mybearworld/roarbotA library for creating bots for the Meower platform.
This package works with Deno, Bun, 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
Add Package
deno add jsr:@mbw/roarbot
Import symbol
import * as roarbot from "@mbw/roarbot";
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";