This commit is contained in:
March 7th 2022-06-04 14:32:35 +07:00
parent 9688d28a6e
commit 852db8048b
5 changed files with 21 additions and 16 deletions

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "discord.js-selfbot-v13",
"version": "2.0.41",
"version": "2.0.42",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -1,6 +1,6 @@
{
"name": "discord.js-selfbot-v13",
"version": "2.0.41",
"version": "2.0.42",
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
"main": "./src/index.js",
"types": "./typings/index.d.ts",

View File

@ -74,6 +74,11 @@ class User extends Base {
* @readonly
*/
this.applications = null;
/**
* The presence of this user [v12 Patch]
* @type {?Presence}
*/
this.presence = null;
this._patch(data);
}
@ -163,19 +168,18 @@ class User extends Base {
}
/**
* The presence of this user [v12 Patch]
* @type {Presence}
* @readonly
* Get presence of this user
* @returns {?Presence}
*/
get presence() {
let res;
for (const guild of this.client.guilds.cache.map(g => g.presences)) {
if (guild.resolve(this.id)) {
res = guild.resolve(this.id);
break;
}
}
return res;
async getPresence() {
await Promise.all(
this.client.guilds.cache.map(guild => {
const res_ = guild.presences.resolve(this.id);
if (res_) return (this.presence = res_);
else return undefined;
}),
);
return this.presence;
}
/**

3
typings/index.d.ts vendored
View File

@ -2680,7 +2680,7 @@ export class User extends PartialTextBasedChannel(Base) {
public readonly premiumGuildSince: Date;
public readonly bio: string | null;
public readonly mutualGuilds: Collection<Snowflake, object>;
public readonly presence: Presence;
public readonly presence?: Presence;
public avatarURL(options?: ImageURLOptions): string | null;
public bannerURL(options?: ImageURLOptions): string | null;
public createDM(force?: boolean): Promise<DMChannel>;
@ -2697,6 +2697,7 @@ export class User extends PartialTextBasedChannel(Base) {
public setNote(note?: any): Promise<string>;
public getProfile(): Promise<User>;
public toString(): UserMention;
public getPresence(): Promise<Presence | undefined>;
}
export class UserContextMenuInteraction<Cached extends CacheType = CacheType> extends ContextMenuInteraction<Cached> {