#BotKit

Chee Aun 🤔's avatar
Chee Aun 🤔

@[email protected]

Trying out @hongminhee 's .

Wow this might actually work 😮 Just roughly 50 lines of code & 3 dependencies 🤯

Mastodon UI on activitypub.academy showing posts from "ISS Location Bot" with geographic coordinates, a text input box, and a sidebar, with the server domains blurred.
Mastodon UI on activitypub.academy showing posts from "ISS Location Bot" with geographic coordinates, a text input box, and a sidebar, with the server domains blurred.
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

@FediChatBot The attached image is the logo for , let us know what you think of it.

The logo for BotKit
The logo for BotKit
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;
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;
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;
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;
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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
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;
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;
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;
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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
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;
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;
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;
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;
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;
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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
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;
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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I love to hear questions about , like how to use it or the roadmap for the future, so feel free to ask!

https://hollo.social/@fedify/01944e2e-cdc8-75d4-9be4-2e2f6b82ea6d

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;
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;
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;
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;
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;
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;
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;
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;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Okay, I finished the groundwork of today. It's -only yet though. It's on GitHub!

Even though it's built on , its API looks completely different from Fedify's one. I intended to make it resembles more Discord/Telegram bot frameworks than Fedify. I think it's close to my intention.

https://github.com/dahlia/botkit

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected] · Reply to 洪 民憙 (Hong Minhee)'s post

Considering whether to make Deno-only or support Node.js and Bun as well. Making it Deno-only would simplify a lot of things, but … 🤔

洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I prototyped a logo for . What do you think? Does it look okay?

https://hollo.social/@hongminhee/019410c4-07cd-7ed0-bb0e-efb0b6dd88c5

A prototype of a logo for BotKit. It's an unassembled plastic model kit of a cute dinosaur. It's labeled with “BotKit by Fedify.”
A prototype of a logo for BotKit. It's an unassembled plastic model kit of a cute dinosaur. It's labeled with “BotKit by Fedify.”
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I prototyped a logo for . What do you think? Does it look okay?

https://hollo.social/@hongminhee/019410c4-07cd-7ed0-bb0e-efb0b6dd88c5

A prototype of a logo for BotKit. It's an unassembled plastic model kit of a cute dinosaur. It's labeled with “BotKit by Fedify.”
A prototype of a logo for BotKit. It's an unassembled plastic model kit of a cute dinosaur. It's labeled with “BotKit by Fedify.”
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I prototyped a logo for . What do you think? Does it look okay?

https://hollo.social/@hongminhee/019410c4-07cd-7ed0-bb0e-efb0b6dd88c5

A prototype of a logo for BotKit. It's an unassembled plastic model kit of a cute dinosaur. It's labeled with “BotKit by Fedify.”
A prototype of a logo for BotKit. It's an unassembled plastic model kit of a cute dinosaur. It's labeled with “BotKit by Fedify.”
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I prototyped a logo for . What do you think? Does it look okay?

https://hollo.social/@hongminhee/019410c4-07cd-7ed0-bb0e-efb0b6dd88c5

A prototype of a logo for BotKit. It's an unassembled plastic model kit of a cute dinosaur. It's labeled with “BotKit by Fedify.”
A prototype of a logo for BotKit. It's an unassembled plastic model kit of a cute dinosaur. It's labeled with “BotKit by Fedify.”
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;
洪 民憙 (Hong Minhee)'s avatar
洪 民憙 (Hong Minhee)

@[email protected]

I'm currently brainstorming a framework for creating fediverse bots called , based on . It's less flexible than Fedify, but the goal is to make it possible to create simple fediverse bots with much less code. What do you think?

import { createBot, mention, text } from "@fedify/botkit";
import { RedisKvStore } from "@fedify/redis";
import { Redis } from "ioredis";

// Create a bot instance:
const bot = createBot({
  // The bot will have fediverse handle "@greetbot@mydomain":
  username: "greetbot",
  // Set the profile icon (avatar):
  icon: new URL("https://mydomain/icon.png"),
  // Set the bio:
  bio: text`Hi, there! I'm a simple fediverse bot created by ${
    mention("@hongminhee@hollo.social").}`,
  // Use Redis as a key-value store:
  kv: new RedisKvStore(new Redis()),
  // Use Redis as a message queue:
  queue: new RedisMessageQueue(() => new Redis()),
});

// A bot can respond to a mention:
bot.on(/hi|hello|what'?s\s+up/i, (ctx) => {
  return ctx.reply(text`Hi, ${ctx.actor}!`);
});

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

export default bot;
import { createBot, mention, text } from "@fedify/botkit"; import { RedisKvStore } from "@fedify/redis"; import { Redis } from "ioredis"; // Create a bot instance: const bot = createBot({ // The bot will have fediverse handle "@greetbot@mydomain": username: "greetbot", // Set the profile icon (avatar): icon: new URL("https://mydomain/icon.png"), // Set the bio: bio: text`Hi, there! I'm a simple fediverse bot created by ${ mention("@[email protected]").}`, // Use Redis as a key-value store: kv: new RedisKvStore(new Redis()), // Use Redis as a message queue: queue: new RedisMessageQueue(() => new Redis()), }); // A bot can respond to a mention: bot.on(/hi|hello|what'?s\s+up/i, (ctx) => { return ctx.reply(text`Hi, ${ctx.actor}!`); }); // Or, a bot also can actively publish a post: setInterval(async () => { await bot.publish(text`Hi, forks! It's an hourly greeting.`); }, 1000 * 60 * 60); export default bot;