Skip to Content
BuildcordDocs

Work in a server

Make the steps after it act in another server the bot is in.

server.use sets which server the rest of the run works in. A schedule has no server of its own, so a schedule that goes through saved rows uses it to act in each row's server: listing members, looking up roles, or anything else that reads {server.id}.

Settings

SettingWhat it does
ServerThe server's ID, such as {row.server}.

Ways out

Way outWhen
foundThe bot is in that server. The steps after it work there.
missingThe bot isn't in that server, or no ID was given. Nothing changes.

Tokens

TokenValue
{server.id}The server it now works in. {server.name} and the other server tokens follow it.

What came with an interaction about the member who set the flow off, such as their roles, stays with the server it happened in, so conditions about them look the member up again.

Example

A schedule that closes polls every minute: find the polls that are due, and for each one, work in {row.server}, then close it. Steps that count the server's members now count the right server.

Was this page helpful?