

For example, the bot contains several image-editing commands powered by jimp. Using Node gave me access to a huge number of packages through npm, which enabled me to add tons of functionality to the bot with ease. I also wanted to structure the bot's response system asynchronously, and I knew that JavaScript would be my best option for this (particularly back in 2016-2017). There is also a Python library fbchat similar to facebook-chat-api, but I decided to write it using JavaScript because I find it easiest to use for getting projects off the ground quickly, particularly ones that involve a web server. The bot (and BotCore) are written with NodeJS, fully in JavaScript. AssumeZero Bot and my other Messenger bot projects are now built on BotCore, but BotCore itself was written by pulling out infrastructure that I wrote specifically for AssumeZero Bot and generalizing it to support a network of bot instances.

Today, the bot is a fully-fledged service with automated deploys, easy configuration, and most recently, a framework that I've abstracted away to support other bots that I create and spin up new ones quickly: BotCore. I even added pinging other users in the chat) before Messenger itself had that feature! Pull requests to facebook-chat-api were some of my first open source contributions as I endeavored to add features to my bot that were not yet available in the API.įrom this simple start, I've added tons of features to the bot over the past 4 years, including utility commands for splitting prices, looking up information, doing calculations, creating events and reminders (which Messenger itself no longer supports), and all kinds of other automated tasks that are useful for a group chat.

This allows it to be much more functional than Facebook's official API for bots, which only permits direct one-on-one communication with the bot.

It does this by interfacing with Schmavery's facebook-chat-api, an unofficial Messenger API that works by mimicking user requests made in the browser to trick Messenger into thinking that a real user sent them. The simplest description of AssumeZero Bot is this: a chat bot that can be added to Facebook Messenger conversations to control and expose features either hidden or limited by the actual UI. In a lot of ways, it has grown with me in that time, from a small toy script to a full codebase reflective of all the skills I've learned since I first git init'd. For my final project, I thought I'd submit a project I've been working on throughout my entire college career.
