demoji
v2.0.0
Published
A powerful JavaScript library for DiscordEmoji API
Downloads
3
Maintainers
Readme
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);