Birb / UserFlags
Class: UserFlags
Hierarchy
-
↳
UserFlags
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new UserFlags(bits?
)
The Intents Bitfield stores bits as bigints.
Parameters
Name | Type | Description |
---|---|---|
bits? | number | bigint | The bigint or number representation of the Bitfield. |
Overrides
Defined in
src/classes/bitfields/UserFlags.ts:76
Properties
bits
• bits: bigint
The bits as a bigint.
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:10
FLAGS
▪ Static
Readonly
FLAGS: Object
= UserFlag
The possible Intents the client can use.
Type declaration
Name | Type | Description |
---|---|---|
BOT_HTTP_INTERACTIONS | bigint | A bot that uses only HTTP interactions and is shown in the online member list |
BUG_HUNTER_LEVEL_1 | bigint | Bug Hunter Level 1 |
BUG_HUNTER_LEVEL_2 | bigint | Bug Hunter Level 2 |
CERTIFIED_MODERATOR | bigint | Discord Certified Moderator |
HYPESQUAD | bigint | HypeSquad Events Member |
HYPESQUAD_ONLINE_HOUSE_BALANCE | bigint | House Balance Member |
HYPESQUAD_ONLINE_HOUSE_BRAVERY | bigint | House Bravery Member |
HYPESQUAD_ONLINE_HOUSE_BRILLIANCE | bigint | House Brilliance Member |
NITRO_EARLY_SUPPORTER | bigint | Early Nitro Supporter |
PARTNER | bigint | Partnered Server Owner |
STAFF | bigint | Discord Employee or Staff Member |
TEAM_PSEUDO_USER | bigint | The user is actually a team |
VERIFIED_BOT | bigint | Verified Bot |
VERIFIED_BOT_DEVELOPER | bigint | Early Verified Bot Developer |
Defined in
src/classes/bitfields/UserFlags.ts:69
Methods
add
▸ add(…flags
): UserFlags
Adds bits to the Bitfield.
Parameters
Name | Type | Description |
---|---|---|
...flags | BitResolvable <"STAFF" | "PARTNER" | "HYPESQUAD" | "BUG_HUNTER_LEVEL_1" | "HYPESQUAD_ONLINE_HOUSE_BRAVERY" | "HYPESQUAD_ONLINE_HOUSE_BRILLIANCE" | "HYPESQUAD_ONLINE_HOUSE_BALANCE" | "NITRO_EARLY_SUPPORTER" | "TEAM_PSEUDO_USER" | "BUG_HUNTER_LEVEL_2" | "VERIFIED_BOT" | "VERIFIED_BOT_DEVELOPER" | "CERTIFIED_MODERATOR" | "BOT_HTTP_INTERACTIONS" >[] | The BitResolvable (s) to add. |
Returns
The updated Bitfield instance.
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:79
clone
▸ clone(): UserFlags
Clones the Bitfield.
Returns
The cloned Bitfield.
Overrides
Defined in
src/classes/bitfields/UserFlags.ts:80
convert
▸ convert(flags
): bigint
Converts a BitResolvable to a bigint.
Parameters
Name | Type | Description |
---|---|---|
flags | BitResolvable <"STAFF" | "PARTNER" | "HYPESQUAD" | "BUG_HUNTER_LEVEL_1" | "HYPESQUAD_ONLINE_HOUSE_BRAVERY" | "HYPESQUAD_ONLINE_HOUSE_BRILLIANCE" | "HYPESQUAD_ONLINE_HOUSE_BALANCE" | "NITRO_EARLY_SUPPORTER" | "TEAM_PSEUDO_USER" | "BUG_HUNTER_LEVEL_2" | "VERIFIED_BOT" | "VERIFIED_BOT_DEVELOPER" | "CERTIFIED_MODERATOR" | "BOT_HTTP_INTERACTIONS" > | BitResolvable <"STAFF" | "PARTNER" | "HYPESQUAD" | "BUG_HUNTER_LEVEL_1" | "HYPESQUAD_ONLINE_HOUSE_BRAVERY" | "HYPESQUAD_ONLINE_HOUSE_BRILLIANCE" | "HYPESQUAD_ONLINE_HOUSE_BALANCE" | "NITRO_EARLY_SUPPORTER" | "TEAM_PSEUDO_USER" | "BUG_HUNTER_LEVEL_2" | "VERIFIED_BOT" | "VERIFIED_BOT_DEVELOPER" | "CERTIFIED_MODERATOR" | "BOT_HTTP_INTERACTIONS" >[] | The BitResolvable (s) to convert. |
Returns
bigint
The bigint representation of the BitResolvable
(s).
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:43
has
▸ has(…flags
): boolean
Checks if the Bitfield has the given flag.
Parameters
Name | Type | Description |
---|---|---|
...flags | BitResolvable <"STAFF" | "PARTNER" | "HYPESQUAD" | "BUG_HUNTER_LEVEL_1" | "HYPESQUAD_ONLINE_HOUSE_BRAVERY" | "HYPESQUAD_ONLINE_HOUSE_BRILLIANCE" | "HYPESQUAD_ONLINE_HOUSE_BALANCE" | "NITRO_EARLY_SUPPORTER" | "TEAM_PSEUDO_USER" | "BUG_HUNTER_LEVEL_2" | "VERIFIED_BOT" | "VERIFIED_BOT_DEVELOPER" | "CERTIFIED_MODERATOR" | "BOT_HTTP_INTERACTIONS" >[] | The BitResolvable (s) to check. |
Returns
boolean
Whether the Bitfield has the given flag(s).
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:127
isEmpty
▸ isEmpty(): boolean
Checks if the Bitfield is empty.
Returns
boolean
Whether the Bitfield is empty.
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:136
isLocked
▸ isLocked(): boolean
Check if the Bitfield is locked.
Returns
boolean
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:178
remove
▸ remove(…flags
): UserFlags
Removes bits from the Bitfield.
Parameters
Name | Type | Description |
---|---|---|
...flags | BitResolvable <"STAFF" | "PARTNER" | "HYPESQUAD" | "BUG_HUNTER_LEVEL_1" | "HYPESQUAD_ONLINE_HOUSE_BRAVERY" | "HYPESQUAD_ONLINE_HOUSE_BRILLIANCE" | "HYPESQUAD_ONLINE_HOUSE_BALANCE" | "NITRO_EARLY_SUPPORTER" | "TEAM_PSEUDO_USER" | "BUG_HUNTER_LEVEL_2" | "VERIFIED_BOT" | "VERIFIED_BOT_DEVELOPER" | "CERTIFIED_MODERATOR" | "BOT_HTTP_INTERACTIONS" >[] | The BitResolvable (s) to remove. |
Returns
The updated Bitfield instance.
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:111
set
▸ set(…flags
): UserFlags
Sets the contents of the Bitfield.
Parameters
Name | Type | Description |
---|---|---|
...flags | BitResolvable <"STAFF" | "PARTNER" | "HYPESQUAD" | "BUG_HUNTER_LEVEL_1" | "HYPESQUAD_ONLINE_HOUSE_BRAVERY" | "HYPESQUAD_ONLINE_HOUSE_BRILLIANCE" | "HYPESQUAD_ONLINE_HOUSE_BALANCE" | "NITRO_EARLY_SUPPORTER" | "TEAM_PSEUDO_USER" | "BUG_HUNTER_LEVEL_2" | "VERIFIED_BOT" | "VERIFIED_BOT_DEVELOPER" | "CERTIFIED_MODERATOR" | "BOT_HTTP_INTERACTIONS" >[] | The BitResolvable (s) to set. |
Returns
The updated Bitfield instance.
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:95
toArray
▸ toArray(): ("STAFF"
| "PARTNER"
| "HYPESQUAD"
| "BUG_HUNTER_LEVEL_1"
| "HYPESQUAD_ONLINE_HOUSE_BRAVERY"
| "HYPESQUAD_ONLINE_HOUSE_BRILLIANCE"
| "HYPESQUAD_ONLINE_HOUSE_BALANCE"
| "NITRO_EARLY_SUPPORTER"
| "TEAM_PSEUDO_USER"
| "BUG_HUNTER_LEVEL_2"
| "VERIFIED_BOT"
| "VERIFIED_BOT_DEVELOPER"
| "CERTIFIED_MODERATOR"
| "BOT_HTTP_INTERACTIONS"
)[]
Converts the Bitfield to an array of strings.
Returns
("STAFF"
| "PARTNER"
| "HYPESQUAD"
| "BUG_HUNTER_LEVEL_1"
| "HYPESQUAD_ONLINE_HOUSE_BRAVERY"
| "HYPESQUAD_ONLINE_HOUSE_BRILLIANCE"
| "HYPESQUAD_ONLINE_HOUSE_BALANCE"
| "NITRO_EARLY_SUPPORTER"
| "TEAM_PSEUDO_USER"
| "BUG_HUNTER_LEVEL_2"
| "VERIFIED_BOT"
| "VERIFIED_BOT_DEVELOPER"
| "CERTIFIED_MODERATOR"
| "BOT_HTTP_INTERACTIONS"
)[]
The array of strings representation of the Bitfield.
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:154
toBigInt
▸ toBigInt(): bigint
Converts the Bitfield to a bigint.
Returns
bigint
The bigint representation of the Bitfield.
Inherited from
Defined in
src/classes/bitfields/Bitfield.ts:145