This commit is contained in:
March 7th
2022-05-06 21:17:20 +07:00
parent 89508c214b
commit 391d972d98
10 changed files with 47 additions and 30 deletions

View File

@@ -127,10 +127,16 @@ class Client extends BaseClient {
*/
this.users = new UserManager(this);
/** Patch
*
// Patch
/**
* All of the relationships {@link User}
* @type {RelationshipsManager}
*/
this.relationships = new RelationshipsManager(this);
/**
* All of the settings {@link Object}
* @type {ClientUserSettingManager}
*/
this.setting = new ClientUserSettingManager(this);
/**
* All of the guilds the client is currently handling, mapped by their ids -

View File

@@ -9,8 +9,8 @@ module.exports = (client, { d: data }) => {
client.relationships.cache.set(data.id, data.type);
/**
* Emitted whenever a relationship is updated.
* @event Client#relationshipUpdate
* @param {UserID} user The userID that was updated
* @event Client#relationshipAdd
* @param {UserId} user The userID that was updated
* @param {Number} type The new relationship type
*/
client.emit(Events.RELATIONSHIP_ADD, data.id, data.type);

View File

@@ -6,8 +6,8 @@ module.exports = (client, { d: data }) => {
client.relationships.cache.delete(data.id);
/**
* Emitted whenever a relationship is updated.
* @event Client#relationshipUpdate
* @param {UserID} user The userID that was updated
* @event Client#relationshipRemove
* @param {UserId} user The userID that was updated
*/
client.emit(Events.RELATIONSHIP_REMOVE, data.id);
};

View File

@@ -68,6 +68,7 @@ class PartialGroupDMChannel extends Channel {
/**
* Invites fetch
* @type {Collection<string, Invite>}
*/
this.invites = new Collection();

View File

@@ -127,6 +127,7 @@ class User extends Base {
/**
* Check relationship status
* @type {Relationship}
* @readonly
*/
get relationships() {
@@ -136,6 +137,7 @@ class User extends Base {
/**
* Check note
* @type {?string}
* @readonly
*/
get note() {

View File

@@ -195,7 +195,7 @@ exports.Opcodes = {
INVALID_SESSION: 9, // # Receive used to notify client they have an invalid session id
HELLO: 10, // # Receive sent immediately after connecting, contains heartbeat and server debug information
HEARTBEAT_ACK: 11, // # Sent immediately following a client heartbeat that was received
// GUILD_SYNC: 12, // # Receive guild_sync but not used anymore
GUILD_SYNC: 12, // # Receive guild_sync but not used anymore
/** Add some opcode from Discum
/* @extends https://github.com/Merubokkusu/Discord-S.C.U.M/blob/master/discum/gateway/gateway.py#L56
*/