RoleToggles
Documentation / @discordeno/bot / RoleToggles
Class: RoleToggles
Defined in: packages/bot/src/transformers/toggles/role.ts:19
Extends
Constructors
new RoleToggles()
new RoleToggles(
roleOrTogglesInt
):RoleToggles
Defined in: packages/bot/src/transformers/toggles/role.ts:20
Parameters
roleOrTogglesInt
number
| DiscordRole
Returns
Overrides
Properties
bitfield
bitfield:
number
=0
Defined in: packages/bot/src/transformers/toggles/ToggleBitfield.ts:2
Inherited from
Accessors
availableForPurchase
Get Signature
get availableForPurchase():
boolean
Defined in: packages/bot/src/transformers/toggles/role.ts:57
Whether this role is available for purchase.
Returns
boolean
guildConnections
Get Signature
get guildConnections():
boolean
Defined in: packages/bot/src/transformers/toggles/role.ts:62
Whether this is a guild's linked role.
Returns
boolean
hoist
Get Signature
get hoist():
boolean
Defined in: packages/bot/src/transformers/toggles/role.ts:37
If this role is showed separately in the user listing
Returns
boolean
managed
Get Signature
get managed():
boolean
Defined in: packages/bot/src/transformers/toggles/role.ts:42
Whether this role is managed by an integration
Returns
boolean
mentionable
Get Signature
get mentionable():
boolean
Defined in: packages/bot/src/transformers/toggles/role.ts:47
Whether this role is mentionable
Returns
boolean
premiumSubscriber
Get Signature
get premiumSubscriber():
boolean
Defined in: packages/bot/src/transformers/toggles/role.ts:52
Whether this is the guilds premium subscriber role
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/role.ts:67
Checks whether or not the permissions exist in this
Parameters
permissions
"managed"
| "hoist"
| "mentionable"
| "premiumSubscriber"
| "availableForPurchase"
| "guildConnections"
| ("managed"
| "hoist"
| "mentionable"
| "premiumSubscriber"
| "availableForPurchase"
| "guildConnections"
)[]
Returns
boolean
list()
list():
Record
<"managed"
|"hoist"
|"mentionable"
|"premiumSubscriber"
|"availableForPurchase"
|"guildConnections"
,boolean
>
Defined in: packages/bot/src/transformers/toggles/role.ts:74
Lists all the toggles for the role and whether or not each is true or false.
Returns
Record
<"managed"
| "hoist"
| "mentionable"
| "premiumSubscriber"
| "availableForPurchase"
| "guildConnections"
, 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