DiSky DiSky v5.0.0-b1

Role

type

A guild role: colour, name and permissions.

13 / 13

Properties

6
propertyNumbersince 5.0.0-a1
[the] role position of %role%
%role%'s role position

The position (ordering index) of the role within the guild's role list.

Helpful?
propertyRolecolorsince 5.0.0-a1
[the] role colors of %role%
%role%'s role colors

The full color set (primary / secondary / tertiary) of the role (JDA 6.x role colors).

Helpful?
propertylist of Permissionawait since 5.0.0-b1
[the] discord permissions of %role%
%role%'s discord permissions

The guild-wide permissions of the role, the ones set in the role settings of the guild (channel overrides are not included; see the allowed and denied discord permissions in a channel).

Set, add and remove change the role on Discord. Setting it to nothing (or deleting it) leaves the role with no permission at all; reset is not supported, since a role has no default to go back to.

The bot needs the 'manage roles' permission, a role below its own highest role, and every permission it gives: Discord refuses to grant a permission the bot does not have itself.

change modes setaddremovedelete
Helpful?
propertyText since 5.0.0-a1
[the] name of %role%
%role%'s name

The name of a Discord entity: a user's or member's account name, a guild's name, a role/channel name, a bot's define-name. Registered on Skript's native Property.NAME, so the idiomatic "name of %x%" works without colliding. For a member's server nickname or display name, use "effective name".

change modes set
Helpful?
propertyColor since 5.0.0-a1
[the] color of %role%
%role%'s color

The color of a Discord entity: a role's color, an embed's side bar, or the color a role builder will be created with. Registered on Skript's native Property.COLOR (Skript 2.16), so "color of %x%" is the same expression that colors a block or a firework, dispatched per runtime type.

Write-only on a role builder and on an embed builder: JDA exposes no getter on either, so reading them gives <none>.

change modes set
Helpful?
propertyGuild since 5.0.0-a1
[the] guild of %role%
%role%'s guild

The guild a Discord entity belongs to: a member's, message's, role's, channel's, webhook's, sticker's, emoji's or scheduled event's guild. Co-owned across every such type, so "guild of %x%" works on any of them (null when the entity is not tied to a guild, e.g. a message from DMs).

Helpful?

Getters

1

Effects

4
effectasync since 5.0.0-a1
move [the] [discord] role %role% above [the] [discord] [role] %role%

Moves a role directly above another one of the same guild. Indexes update automatically.

Helpful?
effectasync since 5.0.0-a1
move [the] [discord] role %role% down [%-number% time[s]]

Moves a role down by a number of positions (one by default).

Helpful?
effectasync since 5.0.0-a1
move [the] [discord] role %role% under [the] [discord] [role] %role%

Moves a role directly below another one of the same guild. Indexes update automatically.

Helpful?
effectasync since 5.0.0-a1
move [the] [discord] role %role% up [%-number% time[s]]

Moves a role up by a number of positions (one by default).

Helpful?

Conditions

2
conditionsince 5.0.0-a1
%roles% (is|are) hoisted

Whether the role is hoisted (shown separately in the member list).

Helpful?
conditionsince 5.0.0-a1
%roles% (is|are) mentionable

Whether the role can be mentioned by anyone.

Helpful?

Returned by

12

Syntaxes elsewhere in DiSky that return Role.

Documentation

1

Hand-written guides that cover Role.

An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.