Server · Value
Server roles
Every role in the server, highest first (not @everyone): loop over them, or save the Snapshot to rebuild lost roles.
server.roles
In a flow
“Works out server roles whenever a step wired to it needs the answer.”
→ [@Admin, @Mod, @Member]
What it does
Every role in the server, highest first (not @everyone): loop over them, or save the Snapshot to rebuild lost roles. It's a value node: no white pins, it works out its answer when a step wired to it needs it. It gives 5 values later steps can use. Find it under Server in the palette.
When to use it
Use it when the flow changes the server itself: every role in the server, highest first (not @everyone): loop over them, or save the Snapshot to rebuild lost roles.
When not to
For a value that never changes, type it into the setting instead of wiring a node.
Typical wiring
Sockets: settings you can wire
- Include app roles Yes / no
-
On: also bots' own roles and the booster role, which nobody can hand out.
What goes there: Type it in the side panel, or wire in true or false. e.g. true
If it's empty: Optional. Left alone, it's off.
Connects fromAdd a labelAdd to a leaderboardAge from birthdayAI check a messageAnagram checkAndAnswer a deadlineAnti-nuke guardand 270 more
Values it gives
- Roles list:role
-
The roles, highest first. e.g. @Verified, and more like it
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAdd onboarding questionAdd to listAdd up timesAutoMod: add or remove allowed wordsAutoMod: add or remove wordsAutoMod: block wordsBar chartBest by a fieldand 88 more
- Names list:text
-
Their names, in the same order. e.g. Hello there, and more like it
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toCreate pollPoll with resultsAdd onboarding questionAdd to listAdd up timesAutoMod: add or remove allowed wordsAutoMod: add or remove wordsAutoMod: block wordsand 90 more
- How many Number
-
How many there are. e.g. 8
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAccount ageActive membersAddAdd answer to formAdd soundboard soundAdd timeAdd to a counterAdd to a leaderboardand 719 more
- As lines Text
-
Their mentions, one per line. e.g. Hello there
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAccept applicationAdd a forum tagAdd a labelAdd a Notion pageAdd a row to a Google SheetAdd a staff noteAdd a stickerAdd a Trello cardand 578 more
- Snapshot Text
-
Each one's name, colour and settings as JSON, to keep in a table. e.g. Hello there
If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.
Connects toAccept applicationAdd a forum tagAdd a labelAdd a Notion pageAdd a row to a Google SheetAdd a staff noteAdd a stickerAdd a Trello cardand 578 more