From 5d10585af8f41cc5fbf49172a9ce143a4ad34f62 Mon Sep 17 00:00:00 2001 From: izexi <43889168+izexi@users.noreply.github.com> Date: Sun, 14 Apr 2019 13:43:01 +0100 Subject: [PATCH] docs(Presence): add missing descriptions to clientStatus (#3127) * add description on jsdocs for User.clientStatus * Update src/structures/Presence.js Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com> * Update src/structures/Presence.js Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com> * Update src/structures/Presence.js Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com> * update typings --- src/structures/Presence.js | 6 +++--- typings/index.d.ts | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 5d82ac07e..a2d76bc09 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -77,9 +77,9 @@ class Presence { /** * The devices this presence is on * @type {?object} - * @property {PresenceStatus} web - * @property {PresenceStatus} mobile - * @property {PresenceStatus} desktop + * @property {?PresenceStatus} web The current presence in the web application + * @property {?PresenceStatus} mobile The current presence in the mobile application + * @property {?PresenceStatus} desktop The current presence in the desktop application */ this.clientStatus = data.client_status || null; diff --git a/typings/index.d.ts b/typings/index.d.ts index 4af8827c3..172d0dc82 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -813,7 +813,7 @@ declare module 'discord.js' { public activity: Activity; public flags: Readonly; public status: PresenceStatus; - public clientStatus: ClientPresenceStatusData; + public clientStatus: ClientPresenceStatusData | null; public readonly user: User; public readonly member?: GuildMember; public equals(presence: Presence): boolean; @@ -2073,9 +2073,9 @@ declare module 'discord.js' { type ClientPresenceStatus = 'online' | 'idle' | 'dnd'; interface ClientPresenceStatusData { - web?: ClientPresenceStatus; - mobile?: ClientPresenceStatus; - desktop?: ClientPresenceStatus; + web?: PresenceStatus; + mobile?: PresenceStatus; + desktop?: PresenceStatus; } type PartialTypes = 'USER'