Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/totigm/bot-builder

This is a library to create bots for different platforms. It handles all the commands stuff behind the scenes, so you can focus on your bot's logic.
https://github.com/totigm/bot-builder

abstraction bot bot-builder botbuilder builder typescript

Last synced: 28 days ago
JSON representation

This is a library to create bots for different platforms. It handles all the commands stuff behind the scenes, so you can focus on your bot's logic.

Awesome Lists containing this project

README

        

Welcome to @totigm/bot-builder 👋



NPM version


GitHub repo


Downloads


CI


GitHub repo stars


Documentation


License: MIT

## 📄 Introduction

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.

## 🔗 Quick links

- [Reference documentation](./docs/reference.md)
- [Bot options](./docs/bot-options.md)
- [WhatsApp bot](https://www.npmjs.com/package/@totigm/whatsapp-bot)
- [Discord bot](https://www.npmjs.com/package/@totigm/discord-bot)
- [GitHub](https://github.com/totigm/bot-builder#readme)
- [NPM](https://www.npmjs.com/package/@totigm/bot-builder)

## 💻 Installation

```sh
npm i @totigm/bot-builder
```

or

```sh
yarn add @totigm/bot-builder
```

## 🚀 Getting started

See how to create a bot for [WhatsApp](https://www.npmjs.com/package/@totigm/whatsapp-bot) or [Discord](https://www.npmjs.com/package/@totigm/discord-bot). You can also create your own bot for any platform you want.

Start adding commands to your bot by checking the [reference documentation](./docs/reference.md).

## 🤖 Example usage

Check out [@totigm/whatsapp-bot](https://github.com/totigm/whatsapp-bot/blob/main/src/bot/index.ts) and [@totigm/discord-bot](https://github.com/totigm/discord-bot/blob/main/src/bot/index.ts) to see implementations for different platforms.

## ⚙️ Options

When you create a bot, you can pass an options object to customize it. Check the [bot options](./docs/bot-options.md) documentation for more information.

```ts
const botOptions = { ... };

const bot = new Bot(botOptions);
```

## 👤 Author


GitHub: totigm




Twitter: totigm8




LinkedIn: totigm




NPM: totigm

## 🤝 Contributing

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](./docs/CONTRIBUTING.md).

## ⭐️ Show your support

Give a ⭐️ if this project helped you!

## 📝 License

Copyright © 2022 [Toti Muñoz](https://github.com/totigm).

This project is [MIT](https://github.com/totigm/bot-builder/blob/master/LICENSE) licensed.

---

This project was made with ❤ and TypeScript