mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
Add client.emojis and fix eslint
This commit is contained in:
parent
db9d5b8110
commit
bcab8805af
3 changed files with 13 additions and 2 deletions
File diff suppressed because one or more lines are too long
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue