# easier-discordbot

> A package that makes creating Discord Bots easier.

Latest version **1.1.0** (published 2021-09-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install easier-discordbot
pnpm add easier-discordbot
yarn add easier-discordbot
bun add easier-discordbot
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-09-04 |
| First published | 2021-08-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | BlueSky |
| Maintainers | blueskyjsdev |
| Keywords | Discord, discord, bot |

## Links

- npm: https://www.npmjs.com/package/easier-discordbot
- npm.io page: https://npm.io/package/easier-discordbot

## Dependencies (1)

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

## Recent versions

- 1.1.0 (latest) — 2021-09-04
- 1.0.9 — 2021-08-30
- 1.0.8 — 2021-08-30
- 1.0.7 — 2021-08-30
- 1.0.6 — 2021-08-30
- 1.0.5 — 2021-08-30
- 1.0.4 — 2021-08-30
- 1.0.3 — 2021-08-30

## README

# Easier Discord Bot!
Everyone can make a bot with this package!

Example code:
```javascript
const easierDiscord = require('easier-discordbot');

// Create a Discord client
const bot = easierDiscord.createClient();

// Log in to your bot (change 'BOT TOKEN' with your own Discord bot token)
bot.login('BOT TOKEN');

// Change bot prefix (default prefix is '!')
bot.setPrefix('?');

// A Basic Command that replies with 'Pong!' when '?ping' is typed
bot.addCommand('ping', 'Pong!');

// Another Basic Command but has a cooldown of 2500 miliseconds (2.5 sec) this time 
bot.addCommand('hello', 'Hello!', { cooldown: 2500 });

// A Function Command that replies with an embed with authors info when '?myinfo' is typed
bot.addCommand('myinfo', (msg) => {
    var embed = easierDiscord.createMessageEmbed('Your Info', '#ffffff', 'Some basic information about your Discord Account:', {url: msg.author.avatarURL()}, {text: 'YOUR INFORMATION'})
        .addField('Full Tag', msg.author.tag)
        .addField('Username', msg.author.username)
        .addField('Discriminator', msg.author.discriminator)
        .addField('ID', msg.author.id);
    if(msg.channel.type == 'text'){
        embed.addField('Server Nickname', msg.member.displayName);
        embed.addField('Highest Role', msg.member.roles.highest);
    }
    msg.channel.send(embed);
}, { cooldown: 5000 });
```

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