Add client.emojis and fix eslint

This commit is contained in:
Amish Shah
2016-09-04 17:54:26 +01:00
parent db9d5b8110
commit bcab8805af
3 changed files with 13 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -208,6 +208,17 @@ class Client extends EventEmitter {
get uptime() {
return this.readyTime ? Date.now() - this.readyTime : null;
}
/**
* The emojis that the client can use. Mapped by emoji ID.
* @type {Collection<string, Emoji>}
* @readonly
*/
get emojis() {
const emojis = new Collection();
this.guilds.map(g => g.emojis.map(e => emojis.set(e.id, e)));
return emojis;
}
}
module.exports = Client;

View File

@@ -85,7 +85,7 @@ class ClientUser extends User {
* Set the status and playing game of the logged in client.
* @param {string} [status] The status, can be `online` or `idle`
* @param {string|Object} [game] The game that is being played
* @param {string} [streamURL] If you want to display as streaming, set this as the URL to the stream (must be a
* @param {string} [url] If you want to display as streaming, set this as the URL to the stream (must be a
* twitch.tv URl)
* @returns {Promise<ClientUser>}
* @example