fix: ClientUser.notes return empty Collection
fix: Recieve messages from large servers #72
feat: checkUpdate return Debug event (not console.log)
feat: RelationshipAdd event, param type return RelationshipTypes
feat: online status when login
feat: fix documents
This commit is contained in:
March 7th
2022-06-06 00:42:08 +07:00
parent 04251a8b87
commit c165824419
10 changed files with 78 additions and 51 deletions

View File

@@ -14,17 +14,6 @@ class ClientUser extends User {
_patch(data) {
super._patch(data);
/*
Add: notes
*/
/**
* The notes cache of the client user.
* @type {Collection<Snowflake, Message>}
* @private
*/
this.notes = new Collection();
// This.messageMentions = new Collection();
if ('verified' in data) {
/**
* Whether or not this account has been verified
@@ -67,11 +56,23 @@ class ClientUser extends User {
/**
* Email address of the client user.
* @type {?string}
* @deprecated
* @see https://discord.com/developers/docs/resources/user#user-object
*/
}
/**
* Patch note
* @param {Object} data Note data
* @private
*/
_patchNote(data) {
/**
* The notes cache of the client user.
* @type {Collection<Snowflake, string>}
* @private
*/
this.notes = data ? new Collection(Object.entries(data)) : new Collection();
}
/**
* Represents the client user's presence
* @type {ClientPresence}
@@ -163,10 +164,10 @@ class ClientUser extends User {
/**
* Set HyperSquad House
* @param {HypeSquadOptions<number|string>} type
* `LEAVE`: 0
* `HOUSE_BRAVERY`: 1
* `HOUSE_BRILLIANCE`: 2
* `HOUSE_BALANCE`: 3
* * `LEAVE`: 0
* * `HOUSE_BRAVERY`: 1
* * `HOUSE_BRILLIANCE`: 2
* * `HOUSE_BALANCE`: 3
* @returns {Promise<void>}
* @example
* // Set HyperSquad HOUSE_BRAVERY