mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
docs(Presence): add ClientPresenceStatus typedef (#3208)
This commit is contained in:
@@ -13,7 +13,6 @@ const { ActivityTypes } = require('../util/Constants');
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The status of this presence:
|
* The status of this presence:
|
||||||
*
|
|
||||||
* * **`online`** - user is online
|
* * **`online`** - user is online
|
||||||
* * **`idle`** - user is AFK
|
* * **`idle`** - user is AFK
|
||||||
* * **`offline`** - user is offline or invisible
|
* * **`offline`** - user is offline or invisible
|
||||||
@@ -21,6 +20,14 @@ const { ActivityTypes } = require('../util/Constants');
|
|||||||
* @typedef {string} PresenceStatus
|
* @typedef {string} PresenceStatus
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The status of this presence:
|
||||||
|
* * **`online`** - user is online
|
||||||
|
* * **`idle`** - user is AFK
|
||||||
|
* * **`dnd`** - user is in Do Not Disturb
|
||||||
|
* @typedef {string} ClientPresenceStatus
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a user's presence.
|
* Represents a user's presence.
|
||||||
*/
|
*/
|
||||||
@@ -80,10 +87,10 @@ class Presence {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The devices this presence is on
|
* The devices this presence is on
|
||||||
* @type {?object}
|
* @type {?Object}
|
||||||
* @property {?PresenceStatus} web The current presence in the web application
|
* @property {?ClientPresenceStatus} web The current presence in the web application
|
||||||
* @property {?PresenceStatus} mobile The current presence in the mobile application
|
* @property {?ClientPresenceStatus} mobile The current presence in the mobile application
|
||||||
* @property {?PresenceStatus} desktop The current presence in the desktop application
|
* @property {?ClientPresenceStatus} desktop The current presence in the desktop application
|
||||||
*/
|
*/
|
||||||
this.clientStatus = data.client_status || null;
|
this.clientStatus = data.client_status || null;
|
||||||
|
|
||||||
|
|||||||
6
typings/index.d.ts
vendored
6
typings/index.d.ts
vendored
@@ -2075,9 +2075,9 @@ declare module 'discord.js' {
|
|||||||
type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
|
type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
|
||||||
|
|
||||||
interface ClientPresenceStatusData {
|
interface ClientPresenceStatusData {
|
||||||
web?: PresenceStatus;
|
web?: ClientPresenceStatus;
|
||||||
mobile?: PresenceStatus;
|
mobile?: ClientPresenceStatus;
|
||||||
desktop?: PresenceStatus;
|
desktop?: ClientPresenceStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
type PartialTypes = 'USER'
|
type PartialTypes = 'USER'
|
||||||
|
|||||||
Reference in New Issue
Block a user