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

@hongminhee@hollo.social

I've been considering what to add in the next version of BotKit (v0.2.0) and wanted to share my current plans. After reviewing feedback and examining the ecosystem, I've identified three key features that would significantly enhance the framework's capabilities:

  1. Custom emoji support. This would allow bots to use server-defined custom emojis in their messages, making communication more expressive and allowing better integration with instance culture.

  2. Emoji reactions. I plan to implement both sending and receiving emoji reactions to messages. This provides a lightweight interaction model that many users prefer for simple acknowledgments or responses. This would manifest as new event handlers (like Bot.onReaction) and methods (like Message.react()).

  3. Quote posts. The ability to reference other posts with commentary is an important discourse feature in the fediverse. Supporting both sending quotes and detecting when bot posts have been quoted would enable more sophisticated conversational patterns.

These additions should make more capable while maintaining its simple, developer-friendly API. I expect implementation to involve extending the Message class and adding new Text processing capabilities, all while keeping backward compatibility with existing bots. Having built both Hollo and Hackers' Pub, I already have deep familiarity with how various ActivityPub implementations handle these features across the fediverse. I welcome any community feedback on priorities or implementation details before I begin coding.

Renaud Chaput's avatar
Renaud Chaput

@renchap@oisaur.com · Reply to 洪 民憙 (Hong Minhee)'s post

@hongminhee For quote posts, are you looking to implement our recent FEP?

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

@hongminhee@hollo.social · Reply to 洪 民憙 (Hong Minhee)'s post

First, I'm adding custom emoji support to

Custom emojis
-------------

*This API is available since BotKit 0.2.0.*

You can include a custom emoji in the text using the `customEmoji()` function.
It is an inline construct.

In order to use the `customEmoji()` function, you need to define custom emojis first.  You can define custom emojis by using the `Bot.addCustomEmojis()` method after creating the bot:

~~~~ typescript
// Define custom emojis:
const emojis = bot.addCustomEmojis({
  // Use a local image file:
  botkit: { file: "./botkit.png", type: "image/png" },
  // Use a remote image URL:
  fedify: { url: "https://fedify.dev/logo.png", type: "image/png" },
});
~~~~

The `~BotKit.addCustomEmojis()` method returns an object that contains the custom emojis.  You can use the keys of the object to refer to the custom emojis.  For example:

~~~~ typescript
text`Here's a custom emoji:

${customEmoji(emojis.botkit)} by ${customEmoji(emojis.fedify)}.`
~~~~
ALT text detailsCustom emojis ------------- *This API is available since BotKit 0.2.0.* You can include a custom emoji in the text using the `customEmoji()` function. It is an inline construct. In order to use the `customEmoji()` function, you need to define custom emojis first. You can define custom emojis by using the `Bot.addCustomEmojis()` method after creating the bot: ~~~~ typescript // Define custom emojis: const emojis = bot.addCustomEmojis({ // Use a local image file: botkit: { file: "./botkit.png", type: "image/png" }, // Use a remote image URL: fedify: { url: "https://fedify.dev/logo.png", type: "image/png" }, }); ~~~~ The `~BotKit.addCustomEmojis()` method returns an object that contains the custom emojis. You can use the keys of the object to refer to the custom emojis. For example: ~~~~ typescript text`Here's a custom emoji: ${customEmoji(emojis.botkit)} by ${customEmoji(emojis.fedify)}.` ~~~~