<p>BotKit 0.2.0 Released</p><p>We're pleased to announce the release of <a href="https://botkit.fedify.dev/" rel="nofollow">BotKit</a> 0.2.0! For those new to our project, <a href="/tags/botkit/" rel="tag">#BotKit</a> is a <a href="/tags/typescript/" rel="tag">#TypeScript</a> framework for creating standalone <a href="/tags/activitypub/" rel="tag">#ActivityPub</a> bots that can interact with Mastodon, Misskey, and other <a href="/tags/fediverse/" rel="tag">#fediverse</a> platforms without the constraints of these existing platforms.</p><p>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.</p><p>The Journey to Better Bot Interactions</p><p>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.</p><p>Expressing Your Bot's Personality with Custom Emojis</p><p>One of the most requested features has been <a href="/tags/custom_emoji/" rel="tag">#custom_emoji</a> support. Now your bots can truly express their personality with unique visuals that make their messages stand out.</p><p>// Define custom emojis for your botconst emojis = bot.addCustomEmojis({ botkit: { file: `${import.meta.dirname}/images/botkit.png`, type: "image/png" }, fedify: { url: "<a href="https://fedify.dev/logo.png" rel="nofollow"><span class="invisible">https://</span>fedify.dev/logo.png</a>", type: "image/png" }});// Use these custom emojis in your messagesawait session.publish( text`BotKit ${customEmoji(emojis.botkit)} is powered by Fedify ${customEmoji(emojis.fedify)}`);</p><p>With this new API, you can:</p><p>Add custom emojis to your bot with Bot.addCustomEmojis()<br>Include these emojis in messages with the <a href="https://botkit.fedify.dev/concepts/text#custom-emojis" rel="nofollow">customEmoji()</a> function<br><a href="https://botkit.fedify.dev/concepts/text#emoji" rel="nofollow">Use the text tagged template with Fedify Emoji objects</a></p><p>Engaging Through Reactions</p><p>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:</p><p>// React to a message with a standard Unicode emojiawait message.react(emoji`👍`);// Or use one of your custom emojis as a reactionawait message.react(emojis.botkit);// Create a responsive bot that acknowledges reactionsbot.onReact = async (session, reaction) => { await session.publish( text`Thanks for reacting with ${reaction.emoji} to my message, ${reaction.actor}!`, { visibility: "direct" } );};</p><p>This feature allows your bot to:</p><p>React to messages with Unicode emojis using <a href="https://botkit.fedify.dev/concepts/message#reacting-to-a-message-with-an-emoji" rel="nofollow">Message.react()</a><br>React with the custom emojis you've defined<br>Handle reaction events with <a href="https://botkit.fedify.dev/concepts/events#emoji-reaction" rel="nofollow">Bot.onReact</a> and <a href="https://botkit.fedify.dev/concepts/events#undoing-emoji-reaction" rel="nofollow">Bot.onUnreact</a> handlers</p><p>Conversations Through Quotes</p><p>Discussions often involve referencing what others have said. Our new <a href="/tags/quote/" rel="tag">#quote</a> support enables more cohesive conversation threads:</p><p>// Quote another message in your bot's postawait session.publish( text`Responding to this interesting point...`, { quoteTarget: originalMessage });// Handle when users quote your bot's messagesbot.onQuote = async (session, quoteMessage) => { await session.publish( text`Thanks for sharing my thoughts, ${quoteMessage.actor}!`, { visibility: "direct" } );};</p><p>With quote support, your bot can:</p><p>Quote messages with <a href="https://botkit.fedify.dev/concepts/message#quoting" rel="nofollow">quoteTarget</a> option<br>Access quoted messages via <a href="https://botkit.fedify.dev/concepts/message#quotes" rel="nofollow">Message.quoteTarget</a><br>Handle quote events with the new <a href="https://botkit.fedify.dev/concepts/events#quote" rel="nofollow">Bot.onQuote</a> event handler</p><p>Visual Enhancements</p><p>Because communication is visual too, we've improved how your bot presents itself:</p><p>Image attachments now properly display in the web interface<br>Your bot's content looks better and provides a richer experience</p><p>Behind the Scenes: Enhanced Activity Propagation</p><p>We've also improved how activities propagate through the fediverse:</p><p>More precise propagation of replies, shares, updates, and deletes<br>Activities are now properly sent to the original message authors</p><p>These improvements ensure your bot's interactions are consistent and reliable across different fediverse platforms.</p><p>Taking Your First Steps with BotKit 0.2.0</p><p>Ready to experience these new features? BotKit 0.2.0 is available on <a href="https://jsr.io/@fedify/[email protected]" rel="nofollow">JSR</a> and can be installed with a simple command:</p><p>deno add jsr:@fedify/[email protected]</p><p>Since BotKit uses the Temporal API (which is still evolving in JavaScript), remember to enable it in your deno.json:</p><p>{ "imports": { "@fedify/botkit": "jsr:@fedify/[email protected]" }, "unstable": ["temporal"]}</p><p>With these simple steps, you're ready to create or upgrade your fediverse bot with our latest features.</p><p>Looking Forward</p><p>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.</p><p>For complete docs and more examples, visit our <a href="https://botkit.fedify.dev/" rel="nofollow">docs site</a>.</p><p>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!</p><p>BotKit is powered by <a href="https://fedify.dev/" rel="nofollow">Fedify</a>, a lower-level framework for creating ActivityPub server applications.</p><p><a href="/tags/fedidev/" rel="tag">#fedidev</a> <a href="/tags/emoji_reaction/" rel="tag">#emoji_reaction</a></p>
emoji_reaction
<p>We're excited to introduce <a href="https://botkit.fedify.dev/concepts/message#reacting-to-a-message-with-an-emoji" rel="nofollow">emoji reactions</a> in the upcoming <a href="/tags/botkit/" rel="tag">#BotKit</a> 0.2.0 release!</p><p>With the new <a href="https://jsr.io/@fedify/[email protected]+c997c6a6/doc/message/~/Message.react" rel="nofollow">Message.react()</a> method, your bot can now react to messages using standard Unicode <a href="/tags/emojis/" rel="tag">#emojis</a>:</p><p>await message.react(emoji`👍`);</p><p><a href="/tags/custom_emoji/" rel="tag">#Custom_emoji</a> support is also included, allowing your bot to react with server-specific emojis:</p><p>const emojis = bot.addCustomEmojis({ // Use a remote image URL: yesBlob: { url: "<a href="https://cdn3.emoji.gg/emojis/68238-yesblob.png" rel="nofollow" class="ellipsis" title="cdn3.emoji.gg/emojis/68238-yesblob.png"><span class="invisible">https://</span><span class="ellipsis">cdn3.emoji.gg/emojis/68238-yes</span><span class="invisible">blob.png</span></a>", 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);</p><p>Reactions can be removed using the <a href="https://jsr.io/@fedify/[email protected]+c997c6a6/doc/reaction/~/AuthorizedReaction.unreact" rel="nofollow">AuthorizedReaction.unreact()</a> method:</p><p>const reaction = await message.react(emoji`❤️`);await reaction.unreact();</p><p>Want to try these features now? You can install the development version from <a href="https://jsr.io/@fedify/[email protected]+c997c6a6" rel="nofollow">JSR</a> today:</p><p>deno add jsr:@fedify/[email protected]+c997c6a6</p><p>We're looking forward to seeing how your bots express themselves with this new feature!</p><p><a href="/tags/emoji_reaction/" rel="tag">#emoji_reaction</a> <a href="/tags/fedidev/" rel="tag">#fedidev</a> <a href="/tags/activitypub/" rel="tag">#ActivityPub</a></p>
