Skip to main content
This release is 1 version behind 0.1.1 — the latest version of @fedify/botkit. Jump to latest

@fedify/botkit@0.1.0-dev.71+2449c2d9
Built and signed on GitHub Actions

A framework for creating ActivityPub bots

This package works with Deno
This package works with Deno
JSR Score
88%
Published
a week ago (0.1.0-dev.71+2449c2d9)
interface Message

A message in the ActivityPub network. It is a thin wrapper around a Fedify object: an Article, a ChatMessage, a Note, or a Question.

Type Parameters

T extends MessageClass

The class of the message. One of Article, ChatMessage, Note, or Question.

TContextData

The type of the context data.

Properties

readonly
raw: T

The underlying raw message object.

readonly
id: URL

The URI of the message.

readonly
actor: Actor

The actor who published the message.

The visibility of the message.

readonly
optional
language: LanguageTag

The language of the message if the content is tagged with a language.

readonly
text: string

The plain text content of the message.

readonly
html: string

The HTML content of the message.

The original message in reply to, if the message is a reply.

readonly
mentions: readonly Actor[]

The actors mentioned in the message.

readonly
hashtags: readonly Hashtag[]

The hashtags used in the message.

readonly
attachments: readonly Document[]

The media attachments of the message.

readonly
optional
published: Temporal.Instant

The published time of the message.

readonly
optional
updated: Temporal.Instant

The updated time of the message, if it is updated.

Methods

Publishes a reply to the message.

Publishes a reply to the message.

Shares the message.

It throws an error if the visibility of the message is neither "public" nor "unlisted".

Likes the message.

Add Package

deno add jsr:@fedify/botkit

Import symbol

import { type Message } from "@fedify/botkit/message";

---- OR ----

Import directly with a jsr specifier

import { type Message } from "jsr:@fedify/botkit/message";