mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
Add client.emojis and fix eslint
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -208,6 +208,17 @@ class Client extends EventEmitter {
|
|||||||
get uptime() {
|
get uptime() {
|
||||||
return this.readyTime ? Date.now() - this.readyTime : null;
|
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;
|
module.exports = Client;
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class ClientUser extends User {
|
|||||||
* Set the status and playing game of the logged in client.
|
* Set the status and playing game of the logged in client.
|
||||||
* @param {string} [status] The status, can be `online` or `idle`
|
* @param {string} [status] The status, can be `online` or `idle`
|
||||||
* @param {string|Object} [game] The game that is being played
|
* @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)
|
* twitch.tv URl)
|
||||||
* @returns {Promise<ClientUser>}
|
* @returns {Promise<ClientUser>}
|
||||||
* @example
|
* @example
|
||||||
|
|||||||
Reference in New Issue
Block a user