Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected]

:botkit: Introducing : A framework for creating truly standalone bots!

Unlike traditional Mastodon bots, BotKit lets you build fully independent bots that aren't constrained by platform limits. Create your entire bot in a single TypeScript file using our simple, expressive API.

Currently -only, with Node.js & Bun support planned. Built on the robust foundation.

https://botkit.fedify.dev/

import {
  createBot,
  InProcessMessageQueue,
  MemoryKvStore,
  mention,
  text,
} from "@fedify/botkit";

// Create a bot instance:
const bot = createBot<void>({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the display name:
  name: "Greet Bot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  summary: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social")}.`,
  // Store data in memory (for development):
  kv: new MemoryKvStore(),
  // Use in-process message queue (for development):
  queue: new InProcessMessageQueue(),
});

// A bot can respond to a mention:
bot.onMention = async (session, message) => {
  await message.reply(text`Hi, ${message.actor}!`);
};

// Or, a bot also can actively publish a post:
const session = bot.getSession("https://mydomain/");
setInterval(async () => {
  await session.publish(text`Hi, forks! It's an hourly greeting.`);
}, 1000 * 60 * 60);

export default bot;
import { createBot, InProcessMessageQueue, MemoryKvStore, mention, text, } from "@fedify/botkit"; // Create a bot instance: const bot = createBot<void>({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the display name: name: "Greet Bot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: summary: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]")}.`, // Store data in memory (for development): kv: new MemoryKvStore(), // Use in-process message queue (for development): queue: new InProcessMessageQueue(), }); // A bot can respond to a mention: bot.onMention = async (session, message) => { await message.reply(text`Hi, ${message.actor}!`); }; // Or, a bot also can actively publish a post: const session = bot.getSession("https://mydomain/"); setInterval(async () => { await session.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
Henrik Schönemann's avatar
Henrik Schönemann

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

👀 @stefan I would really like to read your opinion on this!

@fedify

Henrik Schönemann's avatar
Henrik Schönemann

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

@fedify 🤩🤩🤩🤩🤩
Fuck yes!

Daniel Supernault's avatar
Daniel Supernault

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

@fedify This is soo cool, great work!!

Chris​‌​‬ Hayes‌​​​'s avatar
Chris​‌​‬ Hayes‌​​​

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

@fedify btw there's a typo in the subdomain of the link

Institute of Diagram Studies's avatar
Institute of Diagram Studies

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

@fedify There's a typo in the link, it should be botkit.fedify.dev/

a7ndrew's avatar
a7ndrew

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

@fedify
Ye've typoed the link. botkit.fedify.dev/
@dansup

Fedify: an ActivityPub server framework's avatar
Fedify: an ActivityPub server framework

@[email protected] · Reply to Fedify: an ActivityPub server framework's post

:botkit: 독립형 ActivityPub 봇을 만들기 위한 TypeScript 프레임워크인 BotKit을 소개합니다!

일반적인 Mastodon 봇과 달리, BotKit으로 만든 봇은 플랫폼의 제약 없이 완전히 독립적으로 동작하는 연합우주(fediverse) 봇입니다. 간단하고 직관적인 API로 TypeScript 파일 하나만으로도 봇을 만들 수 있어요.

현재는 Deno만 지원하지만, Node.js와 Bun 지원도 계획하고 있습니다. 견고한 Fedify 기반으로 제작되었습니다.

https://botkit.fedify.dev/