diff options
| author | Alee14 <Alee14498@gmail.com> | 2017-07-28 16:20:27 -0400 |
|---|---|---|
| committer | Alee14 <Alee14498@gmail.com> | 2017-07-28 16:20:27 -0400 |
| commit | d35e0862e6b60fe3c4f823371627359f3ce3e68b (patch) | |
| tree | d98b788eb1abf0a8814207b993b4e22efe711deb /node_modules/discord.js/src/structures/Presence.js | |
| parent | 20993df62e7e38ed43428aafa5981afc3543bdea (diff) | |
| download | AleeBot-d35e0862e6b60fe3c4f823371627359f3ce3e68b.tar.gz AleeBot-d35e0862e6b60fe3c4f823371627359f3ce3e68b.tar.bz2 AleeBot-d35e0862e6b60fe3c4f823371627359f3ce3e68b.zip | |
Removing node modules (go get them yourself :P)
Diffstat (limited to 'node_modules/discord.js/src/structures/Presence.js')
| -rw-r--r-- | node_modules/discord.js/src/structures/Presence.js | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/node_modules/discord.js/src/structures/Presence.js b/node_modules/discord.js/src/structures/Presence.js deleted file mode 100644 index ddca5fb..0000000 --- a/node_modules/discord.js/src/structures/Presence.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Represents a user's presence - */ -class Presence { - constructor(data = {}) { - /** - * The status of the presence: - * - * * **`online`** - user is online - * * **`offline`** - user is offline or invisible - * * **`idle`** - user is AFK - * * **`dnd`** - user is in Do not Disturb - * @type {string} - */ - this.status = data.status || 'offline'; - - /** - * The game that the user is playing, `null` if they aren't playing a game. - * @type {?Game} - */ - this.game = data.game ? new Game(data.game) : null; - } - - update(data) { - this.status = data.status || this.status; - this.game = data.game ? new Game(data.game) : null; - } - - /** - * Whether this presence is equal to another - * @param {Presence} presence Presence to compare with - * @returns {boolean} - */ - equals(presence) { - return this === presence || ( - presence && - this.status === presence.status && - this.game ? this.game.equals(presence.game) : !presence.game - ); - } -} - -/** - * Represents a game that is part of a user's presence. - */ -class Game { - constructor(data) { - /** - * The name of the game being played - * @type {string} - */ - this.name = data.name; - - /** - * The type of the game status - * @type {number} - */ - this.type = data.type; - - /** - * If the game is being streamed, a link to the stream - * @type {?string} - */ - this.url = data.url || null; - } - - /** - * Whether or not the game is being streamed - * @type {boolean} - * @readonly - */ - get streaming() { - return this.type === 1; - } - - /** - * Whether this game is equal to another game - * @param {Game} game Game to compare with - * @returns {boolean} - */ - equals(game) { - return this === game || ( - game && - this.name === game.name && - this.type === game.type && - this.url === game.url - ); - } -} - -exports.Presence = Presence; -exports.Game = Game; |
