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
8 months ago (1.8.2)
type alias Pattern

A list of arguments types. This is a list of objects formatted like this:

  • type: A PatternType.
  • optional: Whether it's optional or not. After an optional argument can only be other optional arguments.
  • name: The name of the argument. If both the name and optional aren't given, the type can be standalone without a wrapper object.

Examples

Basic

["number", "string"]
// @Bot cmd 2 4 → [2, "4"]

full

[
  { type: "number", name: "amount" },
  { type: "full", name: "string" }
]
// @Bot cmd 7 Hello, world! → [7, "Hello, world!"]

Optionals

[
  { type: "string", name: "person to greet" },
  { type: "string", optional: true, name: "greeting to use" }
]
// @Bot cmd Josh → ["Josh"]
// @Bot cmd Josh G'day → ["Josh", "G'day"]

Definition

(PatternType | { type: PatternType; name?: string; optional?: boolean; })[]

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 { type Pattern } from "@mbw/roarbot";
or

Import directly with a jsr specifier

import { type Pattern } from "jsr:@mbw/roarbot";

Add Package

bunx jsr add @mbw/roarbot

Import symbol

import { type Pattern } from "@mbw/roarbot";