# demoji

> A powerful JavaScript library for DiscordEmoji API

Latest version **2.0.0** (published 2020-04-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install demoji
pnpm add demoji
yarn add demoji
bun add demoji
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-04-02 |
| First published | 2019-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | chroventer |
| Maintainers | chroventer |
| Keywords | discord, emoji, discordemoji, discord.js |

## Links

- npm: https://www.npmjs.com/package/demoji
- Repository: https://github.com/chroventer/demoji
- Homepage: https://github.com/chroventer/demoji#readme
- Issues: https://github.com/chroventer/demoji/issues
- npm.io page: https://npm.io/package/demoji

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0

## Recent versions

- 2.0.0 (latest) — 2020-04-02
- 1.0.0 — 2019-06-24

## README

# Demoji

> A powerful JavaScript library for [DiscordEmoji](https://discordemoji.com) API.

- Faster
- Object-oriented
- Light-weight

## Installation

***Node.js 8.0.0 or newer is required.***

**Stable**: `npm install demoji` (recommended)

**Master**: `npm install chroventer/demoji` (unstable)

## Example

```js
const Demoji = require('demoji');
const client = new Demoji.Client();

client.stats()
    .then(console.log)
    .catch(console.error);

//Get all the emojis
client.all()
    .then(console.log)
    .catch(console.log);

// Get an emoji by its ID
client.getEmojiById(3111)
    .then(console.log)
    .catch(console.log); // --> {id:3111,title:'DoubleFacepalm', ...}

// Get an emoji by its name
client.getEmojiByName('DoubleFaceplam')
    .then(console.log)
    .catch(console.error); // --> {id:3111,title:'DoubleFacepalm', ...}

client.getEmojiByAuthor('chroventer')
    .then(console.log)
    .catch(console.error);

client.getEmojiByLicense('basic')
    .then(console.log)
    .catch(console.error);

// Get a random emoji
client.random()
    .then(console.log)
    .catch(console.error);
```

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