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