mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
feat: User#flags (#4060)
* feat: user flags * fix: unnecessary negated statement * fix: wording for description * fix: an vs. a * feat: add verified bot and dev flags Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com> * typings :verified bot and dev flags Co-Authored-By: Vlad Frangu <kingdgrizzle@gmail.com> * feat: mon's suggestion, async fetchFlags & jsdoc * feat: added to index.js * fix: typo * style: leveled flags * typings: update leveled flags Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
21
typings/index.d.ts
vendored
21
typings/index.d.ts
vendored
@@ -1469,6 +1469,7 @@ declare module 'discord.js' {
|
||||
public discriminator: string;
|
||||
public readonly defaultAvatarURL: string;
|
||||
public readonly dmChannel: DMChannel;
|
||||
public flags: Readonly<UserFlags>;
|
||||
public id: Snowflake;
|
||||
public lastMessageID: Snowflake | null;
|
||||
public locale: string;
|
||||
@@ -1489,6 +1490,11 @@ declare module 'discord.js' {
|
||||
public typingSinceIn(channel: ChannelResolvable): Date;
|
||||
}
|
||||
|
||||
export class UserFlags extends BitField<UserFlagsString> {
|
||||
public static FLAGS: Record<UserFlagsString, number>;
|
||||
public static resolve(bit?: BitFieldResolvable<UserFlagsString>): number;
|
||||
}
|
||||
|
||||
export class Util {
|
||||
public static basename(path: string, ext?: string): string;
|
||||
public static binaryToID(num: string): Snowflake;
|
||||
@@ -2978,6 +2984,21 @@ declare module 'discord.js' {
|
||||
timeout: NodeJS.Timeout;
|
||||
}
|
||||
|
||||
type UserFlagsString =
|
||||
| 'DISCORD_EMPLOYEE'
|
||||
| 'DISCORD_PARTNER'
|
||||
| 'HYPESQUAD_EVENTS'
|
||||
| 'BUGHUNTER_LEVEL_1'
|
||||
| 'HOUSE_BRAVERY'
|
||||
| 'HOUSE_BRILLIANCE'
|
||||
| 'HOUSE_BALANCE'
|
||||
| 'EARLY_SUPPORTER'
|
||||
| 'TEAM_USER'
|
||||
| 'SYSTEM'
|
||||
| 'BUGHUNTER_LEVEL_2'
|
||||
| 'VERIFIED_BOT'
|
||||
| 'VERIFIED_DEVELOPER';
|
||||
|
||||
type UserResolvable = User | Snowflake | Message | GuildMember;
|
||||
|
||||
type VerificationLevel = 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH' | 'VERY_HIGH';
|
||||
|
||||
Reference in New Issue
Block a user