UserToggles
Documentation / @discordeno/bot / UserToggles
Class: UserToggles
Defined in: packages/bot/src/transformers/toggles/user.ts:15
Extends
Constructors
new UserToggles()
new UserToggles(
userOrTogglesInt
):UserToggles
Defined in: packages/bot/src/transformers/toggles/user.ts:16
Parameters
userOrTogglesInt
number
| DiscordUser
Returns
Overrides
Properties
bitfield
bitfield:
number
=0
Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:2
Inherited from
Accessors
bot
Get Signature
get bot():
boolean
Defined in: packages/bot/src/transformers/toggles/user.ts:31
Whether the user belongs to an OAuth2 application
Returns
boolean
mfaEnabled
Get Signature
get mfaEnabled():
boolean
Defined in: packages/bot/src/transformers/toggles/user.ts:41
Whether the user has two factor enabled on their account
Returns
boolean
system
Get Signature
get system():
boolean
Defined in: packages/bot/src/transformers/toggles/user.ts:36
Whether the user is an Official Discord System user (part of the urgent message system)
Returns
boolean
verified
Get Signature
get verified():
boolean
Defined in: packages/bot/src/transformers/toggles/user.ts:46
Whether the email on this account has been verified
Returns
boolean
Methods
add()
add(
bits
):this
Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:14
Adds some bits to the bitfield.
Parameters
bits
number
Returns
this
Inherited from
contains()
contains(
bits
):boolean
Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:9
Tests whether or not this bitfield has the permission requested.
Parameters
bits
number
Returns
boolean
Inherited from
has()
has(
permissions
):boolean
Defined in: packages/bot/src/transformers/toggles/user.ts:51
Checks whether or not the permissions exist in this
Parameters
permissions
"bot"
| "system"
| "mfaEnabled"
| "verified"
| ("bot"
| "system"
| "mfaEnabled"
| "verified"
)[]
Returns
boolean
list()
list():
Record
<"bot"
|"system"
|"mfaEnabled"
|"verified"
,boolean
>
Defined in: packages/bot/src/transformers/toggles/user.ts:58
Lists all the toggles for the role and whether or not each is true or false.
Returns
Record
<"bot"
| "system"
| "mfaEnabled"
| "verified"
, boolean
>
remove()
remove(
bits
):this
Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:20
Removes some bits from the bitfield.
Parameters
bits
number
Returns
this
Inherited from
toJSON()
toJSON():
number
Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:25
Returns
number