mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
fix(User): remove fetchFlags() (#8755)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
@@ -95,16 +95,6 @@ class UserManager extends CachedManager {
|
|||||||
return this._add(data, cache);
|
return this._add(data, cache);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetches a user's flags.
|
|
||||||
* @param {UserResolvable} user The UserResolvable to identify
|
|
||||||
* @param {BaseFetchOptions} [options] Additional options for this fetch
|
|
||||||
* @returns {Promise<UserFlagsBitField>}
|
|
||||||
*/
|
|
||||||
async fetchFlags(user, options) {
|
|
||||||
return (await this.fetch(user, options)).flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sends a message to a user.
|
* Sends a message to a user.
|
||||||
* @param {UserResolvable} user The UserResolvable to identify
|
* @param {UserResolvable} user The UserResolvable to identify
|
||||||
|
|||||||
@@ -342,15 +342,6 @@ class User extends Base {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Fetches this user's flags.
|
|
||||||
* @param {boolean} [force=false] Whether to skip the cache check and request the API
|
|
||||||
* @returns {Promise<UserFlagsBitField>}
|
|
||||||
*/
|
|
||||||
fetchFlags(force = false) {
|
|
||||||
return this.client.users.fetchFlags(this.id, { force });
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches this user.
|
* Fetches this user.
|
||||||
* @param {boolean} [force=true] Whether to skip the cache check and request the API
|
* @param {boolean} [force=true] Whether to skip the cache check and request the API
|
||||||
|
|||||||
2
packages/discord.js/typings/index.d.ts
vendored
2
packages/discord.js/typings/index.d.ts
vendored
@@ -3460,7 +3460,6 @@ export class User extends Base {
|
|||||||
public displayAvatarURL(options?: ImageURLOptions): string;
|
public displayAvatarURL(options?: ImageURLOptions): string;
|
||||||
public equals(user: User): boolean;
|
public equals(user: User): boolean;
|
||||||
public fetch(force?: boolean): Promise<User>;
|
public fetch(force?: boolean): Promise<User>;
|
||||||
public fetchFlags(force?: boolean): Promise<UserFlagsBitField>;
|
|
||||||
public toString(): UserMention;
|
public toString(): UserMention;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4692,7 +4691,6 @@ export class UserManager extends CachedManager<Snowflake, User, UserResolvable>
|
|||||||
public createDM(user: UserResolvable, options?: BaseFetchOptions): Promise<DMChannel>;
|
public createDM(user: UserResolvable, options?: BaseFetchOptions): Promise<DMChannel>;
|
||||||
public deleteDM(user: UserResolvable): Promise<DMChannel>;
|
public deleteDM(user: UserResolvable): Promise<DMChannel>;
|
||||||
public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<User>;
|
public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<User>;
|
||||||
public fetchFlags(user: UserResolvable, options?: BaseFetchOptions): Promise<UserFlagsBitField>;
|
|
||||||
public send(user: UserResolvable, options: string | MessagePayload | MessageCreateOptions): Promise<Message>;
|
public send(user: UserResolvable, options: string | MessagePayload | MessageCreateOptions): Promise<Message>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user