mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
Added Client#status and Message#type typedefs (#1571)
* typedef for MessageTypes and linked Client#status to Status * should be singular * typedef for Voiceconnection#status
This commit is contained in:
@@ -198,7 +198,7 @@ class Client extends EventEmitter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Current status of the client's connection to Discord
|
* Current status of the client's connection to Discord
|
||||||
* @type {?number}
|
* @type {?Status}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get status() {
|
get status() {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class VoiceConnection extends EventEmitter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The current status of the voice connection
|
* The current status of the voice connection
|
||||||
* @type {number}
|
* @type {VoiceStatus}
|
||||||
*/
|
*/
|
||||||
this.status = Constants.VoiceStatus.AUTHENTICATING;
|
this.status = Constants.VoiceStatus.AUTHENTICATING;
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ class Message {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the message
|
* The type of the message
|
||||||
* @type {string}
|
* @type {MessageType}
|
||||||
*/
|
*/
|
||||||
this.type = Constants.MessageTypes[data.type];
|
this.type = Constants.MessageTypes[data.type];
|
||||||
|
|
||||||
|
|||||||
@@ -329,6 +329,18 @@ exports.WSEvents = {
|
|||||||
RELATIONSHIP_REMOVE: 'RELATIONSHIP_REMOVE',
|
RELATIONSHIP_REMOVE: 'RELATIONSHIP_REMOVE',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of a message, e.g. `DEFAULT`. Here are the available types:
|
||||||
|
* - DEFAULT
|
||||||
|
* - RECIPIENT_ADD
|
||||||
|
* - RECIPIENT_REMOVE
|
||||||
|
* - CALL
|
||||||
|
* - CHANNEL_NAME_CHANGE
|
||||||
|
* - CHANNEL_ICON_CHANGE
|
||||||
|
* - PINS_ADD
|
||||||
|
* - GUILD_MEMBER_JOIN
|
||||||
|
* @typedef {string} MessageType
|
||||||
|
*/
|
||||||
exports.MessageTypes = [
|
exports.MessageTypes = [
|
||||||
'DEFAULT',
|
'DEFAULT',
|
||||||
'RECIPIENT_ADD',
|
'RECIPIENT_ADD',
|
||||||
|
|||||||
Reference in New Issue
Block a user