#custom_emoji — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #custom_emoji, aggregated by home.social.
-
BotKit 0.2.0 Released
We're pleased to announce the release of BotKit 0.2.0! For those new to our project, #BotKit is a #TypeScript framework for creating standalone #ActivityPub bots that can interact with Mastodon, Misskey, and other #fediverse platforms without the constraints of these existing platforms.
This release marks an important step in our journey to make fediverse bot development more accessible and powerful, introducing several features that our community has been requesting.
The Journey to Better Bot Interactions
In building BotKit, we've always focused on making bots more expressive and interactive. With version 0.2.0, we're taking this to the next level by bringing the social aspects of the fediverse to your bots.
Expressing Your Bot's Personality with Custom Emojis
One of the most requested features has been #custom_emoji support. Now your bots can truly express their personality with unique visuals that make their messages stand out.
// Define custom emojis for your bot const emojis = bot.addCustomEmojis({ botkit: { file: `${import.meta.dirname}/images/botkit.png`, type: "image/png" }, fedify: { url: "https://fedify.dev/logo.png", type: "image/png" } }); // Use these custom emojis in your messages await session.publish( text`BotKit ${customEmoji(emojis.botkit)} is powered by Fedify ${customEmoji(emojis.fedify)}` );With this new API, you can:
- Add custom emojis to your bot with
Bot.addCustomEmojis() - Include these emojis in messages with the
customEmoji()function - Use the
texttagged template with FedifyEmojiobjects
Engaging Through Reactions
Communication isn't just about posting messages—it's also about responding to others. The new reaction system creates natural interaction points between your bot and its followers:
// React to a message with a standard Unicode emoji await message.react(emoji`👍`); // Or use one of your custom emojis as a reaction await message.react(emojis.botkit); // Create a responsive bot that acknowledges reactions bot.onReact = async (session, reaction) => { await session.publish( text`Thanks for reacting with ${reaction.emoji} to my message, ${reaction.actor}!`, { visibility: "direct" } ); };This feature allows your bot to:
- React to messages with Unicode emojis using
Message.react() - React with the custom emojis you've defined
- Handle reaction events with
Bot.onReactandBot.onUnreacthandlers
Conversations Through Quotes
Discussions often involve referencing what others have said. Our new #quote support enables more cohesive conversation threads:
// Quote another message in your bot's post await session.publish( text`Responding to this interesting point...`, { quoteTarget: originalMessage } ); // Handle when users quote your bot's messages bot.onQuote = async (session, quoteMessage) => { await session.publish( text`Thanks for sharing my thoughts, ${quoteMessage.actor}!`, { visibility: "direct" } ); };With quote support, your bot can:
- Quote messages with
quoteTargetoption - Access quoted messages via
Message.quoteTarget - Handle quote events with the new
Bot.onQuoteevent handler
Visual Enhancements
Because communication is visual too, we've improved how your bot presents itself:
- Image attachments now properly display in the web interface
- Your bot's content looks better and provides a richer experience
Behind the Scenes: Enhanced Activity Propagation
We've also improved how activities propagate through the fediverse:
- More precise propagation of replies, shares, updates, and deletes
- Activities are now properly sent to the original message authors
These improvements ensure your bot's interactions are consistent and reliable across different fediverse platforms.
Taking Your First Steps with BotKit 0.2.0
Ready to experience these new features? BotKit 0.2.0 is available on JSR and can be installed with a simple command:
deno add jsr:@fedify/[email protected]Since BotKit uses the Temporal API (which is still evolving in JavaScript), remember to enable it in your deno.json:
{ "imports": { "@fedify/botkit": "jsr:@fedify/[email protected]" }, "unstable": ["temporal"] }With these simple steps, you're ready to create or upgrade your fediverse bot with our latest features.
Looking Forward
BotKit 0.2.0 represents our ongoing commitment to making fediverse bot development accessible, powerful, and enjoyable. We believe these new features will help your bots become more engaging and interactive members of the fediverse community.
For complete docs and more examples, visit our docs site.
Thank you to everyone who contributed to this release through feedback, feature requests, and code contributions. The BotKit community continues to grow, and we're excited to see what you'll create!
BotKit is powered by Fedify, a lower-level framework for creating ActivityPub server applications.
- Add custom emojis to your bot with
-
We're excited to introduce emoji reactions in the upcoming #BotKit 0.2.0 release!
With the new
Message.react()method, your bot can now react to messages using standard Unicode #emojis:await message.react(emoji`👍`);#Custom_emoji support is also included, allowing your bot to react with server-specific emojis:
const emojis = bot.addCustomEmojis({ // Use a remote image URL: yesBlob: { url: "https://cdn3.emoji.gg/emojis/68238-yesblob.png", mediaType: "image/png", }, // Use a local image file: noBlob: { file: `${import.meta.dirname}/emojis/no_blob.png`, mediaType: "image/webp", }, }); await message.react(emojis.yesBlob);Reactions can be removed using the
AuthorizedReaction.unreact()method:const reaction = await message.react(emoji`❤️`); await reaction.unreact();Want to try these features now? You can install the development version from JSR today:
deno add jsr:@fedify/[email protected]+c997c6a6We're looking forward to seeing how your bots express themselves with this new feature!
-
We're excited to announce that #BotKit 0.2.0 will introduce custom emoji support! This feature allows your bots to express themselves with more personality and engagement.
What's included:
- Add custom emojis to your bot with
Bot.addCustomEmojis() - Use emoji in messages with the
customEmoji()function - Support for both local image files and remote URLs as emoji sources
- Full integration with BotKit's text formatting system
Simple example:
// Define custom emojis const emojis = bot.addCustomEmojis({ botkit: { file: "./botkit.png", type: "image/png" }, fedify: { url: "https://fedify.dev/logo.png", type: "image/png" } }); // Use in messages await session.publish( text`Hello world! ${customEmoji(emojis.botkit)}` );Want to try it early? You can install the development version from JSR today:
deno add jsr:@fedify/[email protected]+8a0438e6 - Add custom emojis to your bot with
-
So apparently server administrators on the #Fediverse won’t be able to name custom emoji in their native languages and expect them to work in Mastodon, because according to @Gargron non-ASCII signs are hard to input and diacritics shouldn’t change the meaning of words:
https://github.com/mastodon/mastodon/pull/28572#issuecomment-1878952504
No, in my view emoji identifiers shouldn’t be ‘straightforward to input for everyone’. Custom emoji are local to a server; they should be straightforward to input for the users of that server. People from other servers don’t ever have to type their names (unless their administrators choose to add them to their own server), so their ability to type them is completely irrelevant.
Why should a server made specifically for people speaking Russian or Japanese have to use ASCII for their emoji identifiers? Their users have no trouble typing Cyrillic or Kanji signs; it’s what they already do when they make a post; it’s how they normally talk. Why force them to use a different language/alphabet when typing emoji identifiers?
Moreover, linking the username issue makes no sense whatsoever. Usernames are typed across servers and it makes sense to impose stricter technical limitations so more people can read, write and recognise them. This is not the case for emoji; you rarely ever need to type other servers’ emoji identifiers. Normally you don’t even get to see them; you only get to see the picture they represent! Assuming server admins do their job responsibly, there is zero added confusion for anyone involved.
I understand that Unicode is complex, language support is challenging and compromises might be necessary at times. But can we please accept the existence of different languages and writing systems as a reality that we should try to accommodate for, rather than change or circumvent? Yes,
aandáare different signs. Yes, they might radically change the meaning of a word. That’s not a proposition for us to accept or reject; that’s the reality of our multilingual world, and should be the basis of our discussion.#lang_en #accessibility #a11y #custom_emoji #development #emoji #emojos #free_software #internationalisation #internationalization #i18n #languages #localisation #localization #l10n #Mastodon #multilingual #programming #software #Unicode