1.3.5
+ Fix Typescript + Add some websocket event + bla bla
This commit is contained in:
@@ -4,6 +4,7 @@ const User = require('./User');
|
||||
const DataResolver = require('../util/DataResolver');
|
||||
const { HypeSquadOptions } = require('../util/Constants');
|
||||
const { Util } = require('..');
|
||||
const { Collection } = require('@discordjs/collection');
|
||||
|
||||
/**
|
||||
* Represents the logged in client's Discord user.
|
||||
@@ -13,6 +14,12 @@ class ClientUser extends User {
|
||||
_patch(data) {
|
||||
super._patch(data);
|
||||
|
||||
/*
|
||||
Add: notes
|
||||
*/
|
||||
this.notes = new Collection();
|
||||
// this.messageMentions = new Collection();
|
||||
|
||||
if ('verified' in data) {
|
||||
/**
|
||||
* Whether or not this account has been verified
|
||||
|
@@ -36,7 +36,6 @@ class User extends Base {
|
||||
this.premiumGuildSince = null;
|
||||
this.mutualGuilds = new Collection();
|
||||
this.applications = null;
|
||||
this.note = null;
|
||||
this._patch(data);
|
||||
}
|
||||
|
||||
@@ -138,6 +137,14 @@ class User extends Base {
|
||||
return Relationship[parseInt(i)];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check note
|
||||
* @readonly
|
||||
*/
|
||||
get note() {
|
||||
return this.client.user.notes.get(this.id);
|
||||
}
|
||||
|
||||
// Code written by https://github.com/aiko-chan-ai
|
||||
_ProfilePatch(data) {
|
||||
if (!data) return;
|
||||
@@ -188,7 +195,10 @@ class User extends Base {
|
||||
* @returns {Promise<User>} the user object
|
||||
*/
|
||||
async sendFriendRequest() {
|
||||
return this.client.relationships.sendFriendRequest(this.username, this.discriminator);
|
||||
return this.client.relationships.sendFriendRequest(
|
||||
this.username,
|
||||
this.discriminator,
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Blocks the user
|
||||
|
Reference in New Issue
Block a user