# discord-ez-bot

> Super simple Discord bot framework, based on discord.js

Latest version **0.1.0** (published 2021-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install discord-ez-bot
pnpm add discord-ez-bot
yarn add discord-ez-bot
bun add discord-ez-bot
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-05-24 |
| First published | 2021-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bartosz Gleń |
| Maintainers | karmek-k |
| Keywords | discord, wrapper, bot, framework |

## Links

- npm: https://www.npmjs.com/package/discord-ez-bot
- Repository: https://github.com/karmek-k/discord-ez-bot
- npm.io page: https://npm.io/package/discord-ez-bot

## Dependencies (1)

- [discord.js](https://npm.io/package/discord.js.md) ^12.5.3

## Alternatives

- [@sveltejs/kit](https://npm.io/package/@sveltejs/kit.md) — 2.2M weekly downloads
- [@atlaskit/theme](https://npm.io/package/@atlaskit/theme.md) — 402.0K weekly downloads
- [@tangle-network/brand](https://npm.io/package/@tangle-network/brand.md) — 10.0K weekly downloads
- [seneca](https://npm.io/package/seneca.md) — 7.4K weekly downloads
- [@bsb/base](https://npm.io/package/@bsb/base.md) — 7.2K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2021-05-24

## README

# discord-ez-bot

Super simple Discord bot framework, based on [discord.js](https://discord.js.org).

Inspired by Symfony's [Webpack Encore](https://symfony.com/doc/current/frontend/encore/simple-example.html),
you can easily create your bot using a [fluent interface](https://en.wikipedia.org/wiki/Fluent_interface).

## Features

- written in TypeScript - includes `.d.ts` files
- very lightweight
- extremely easy to use
- not a different API wrapper - it can use all the features of discord.js
- all builder methods are documented

## Example

Install the package:

```bash
# if you use npm
npm install discord-ez-bot

# if you use yarn
yarn add discord-ez-bot
```

Now, bring your bot to life:

```javascript
// import the builder
const { DiscordBotBuilder } = require('discord-ez-bot');

// create a bot builder
const bot = new DiscordBotBuilder('?') // define the command prefix
  .whenReady(() => console.log('Ready')) // execute a callback when the bot becomes usable
  .cmd('hello', msg => msg.reply('Hi there!')) // easily handle commands
  .cmd('args', (msg, args) => msg.reply(`You gave me: ${args}`)) // command arguments are supported too
  .on('typingStart', (chan, user) => chan.send(`${user.username} is typing!`)) // and raw `on` events as well
  .build(); // magically create an instance of `Discord.Client`!

// at this point, `bot` can use all discord.js functionalities;
// log in with a bot token, just like you usually would!
bot.login('token');
```

While executing this script, your bot should boot and start responding to commands,
and that's just literally in less than 10 lines of code - how cool is that!?

---
_Source: https://npm.io/package/discord-ez-bot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
