demoji
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Demoji

A powerful JavaScript library for DiscordEmoji 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

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);

Package Sidebar

Install

npm i demoji

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

9.39 kB

Total Files

7

Last publish

Collaborators

  • chroventer