This is a library to create bots. It handles all the commands stuff behind the scenes, so you can focus on your bot's logic.
This library by itself is not a bot, but it provides an abstraction layer to create bots for different platforms. You just have to implement the Bot
class, specifying a client
and an auth
method, and it will take care of the rest.
The Bot
class uses generics types for the Client
and Message
types, so you can use it with any client for any platform that you want. They extend the EventEmitter
and BaseMessage
types respectively.
npm i @totigm/bot-builder
or
yarn add @totigm/bot-builder
See how to create a bot for WhatsApp or Discord. You can also create your own bot for any platform you want.
Start adding commands to your bot by checking the reference documentation.
Check out @totigm/whatsapp-bot and @totigm/discord-bot to see implementations for different platforms.
When you create a bot, you can pass an options object to customize it. Check the bot options documentation for more information.
const botOptions = { ... };
const bot = new Bot(botOptions);
Contributions are more than welcome!
We think that you might have great ideas to make this project even better. If you do, please create a pull request and/or issue following the contribution guidelines.
Give a ⭐️ if this project helped you!
Copyright © 2022 Toti Muñoz.
This project is MIT licensed.
This project was made with ❤ and TypeScript