JSR

Built and signed on GitHub Actions

Works with

This package works with Deno

This package works with Deno

JSR Score88%

License

AGPL-3.0-only

Downloads85/wk

Published5 days ago (0.5.2)

A framework for creating ActivityPub bots

A session to control the bot.

Type Parameters

Properties

A read-only view of the bot to which the session belongs. It exposes the bot's identity and profile (e.g. identifier, username, name) without allowing event handlers to be reassigned through it.

Before BotKit 0.5.0, this property was typed as Bot; it is now a ReadonlyBot so that a session cannot mutate its bot.

The Fedify context of the session.

The URI of the bot actor.

The fediverse handle of the bot actor. It starts with @.

Methods

Gets the Actor object of the bot.

Send a follow request to the specified actor.

Note that it does not guarantee that the follow request will be accepted. You might need to handle Bot.onAcceptFollow and Bot.onRejectFollow events to know the result.

If the bot is already following the actor, it does nothing.

Unfollow the specified actor.

Unlike Session.follow, it immediately unfollows the actor without any confirmation.

If the bot is not following the actor, it does nothing.

Checks whether the bot is following the specified actor.

Republishes the bot profile to its followers.

This is useful when the bot's profile metadata such as its display name, bio, avatar, or header image has changed and remote servers need to be notified explicitly.

Publishes a message attributed to the bot.

Publishes a message attributed to the bot.

Publishes a question attributed to the bot with a poll.

Gets messages from the bot's outbox.

Read the original on jsr.io ↗