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)
class RichPost
implements Post

Constructors

new
RichPost(
post: Post,
bot: RoarBot,
)

Properties

private
_bot: RoarBot
private
_events: [K in keyof RichPostEvents]: RichPostEvents[K][]

The attachments the post has.

readonly
content: string

The contnet of the post.

readonly
createdAt: Date

When the post was created.

readonly
editedAt: Date | undefined

When the post was edited. if it hasn't been, this is undefined.

deprecated
abstract
edited_at: number
readonly
id: string

The ID of the post.

Whether the post is deleted or not.

readonly
origin: string

In which chat the post has been made. This can be an ID or the special chats "home", "livechat" or "inbox".

deprecated
p: string
deprecated
post_id: string
deprecated
post_origin: string
reactions: { count: number; emoji: string; userReacted: boolean; user_reacted: boolean; }[]

The reactions the post got.

readonly
replyTo: (RichPost | null)[]

Which posts the post replied to. null indicates a deleted post or a left out nested post.

deprecated
reply_to: (RichPost | null)[]
deprecated
t: { e: number; }
deprecated
type: number
deprecated
u: string
readonly
username: string

The username of the user who created the post.

Methods

private
_applyPost(post: Post): void
delete(): Promise<void>

Deletes this post.

edit(newContent: string): Promise<void>
on<TEvent extends keyof RichPostEvents>(
event: TEvent,
callback: RichPostEvents[TEvent],
): void

Listen to an event that occurs.

reply(
content: string,
options?: Omit<PostOptions, "replies" | "chat">,
): Promise<RichPost>

Replies to this post.

Static Properties

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

Import directly with a jsr specifier

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

Add Package

bunx jsr add @mbw/roarbot

Import symbol

import { RichPost } from "@mbw/roarbot";