Discord role nodes for campaign graphs
What's new
Campaign graphs accept two new node types that change a player's Discord roles:
GrantDiscordRoleNode— gives the player the Discord role named inrole_id.RemoveDiscordRoleNode— takes that role away.
Both take a required role_id, a Discord snowflake of 1 to 20 digits, alongside the usual node
fields: id, x, y, next_node_id, title, description, result, and break_on_error.
The new nodes are campaign-only. Page graph_rules and segment-group graphs are unchanged.
Impact
Discord roles can now be handed out and revoked from inside a campaign, so a graph can pair the
discord_linked trigger with a role grant and gate a Discord server on what a player has done in
the game — no webhook round trip to the game server, and no separate bot to keep in sync.
Changes
| Resource | Change |
|---|---|
| create_campaign, update_campaign | Added both nodes to the graph.nodes discriminator and oneOf |
| update_campaign_graph | Added both nodes to the graph nodes discriminator and oneOf on the request |
| get_campaign_graph | Added both nodes to the graph nodes discriminator and oneOf on the 200 response |
Upgrade
- No action required. To use a node, add an entry to the campaign graph
nodesmap withmodel_typeset toGrantDiscordRoleNodeorRemoveDiscordRoleNodeandrole_idset to the Discord role's ID. - Clients that read campaign graphs against a generated model should regenerate — these node types
can now come back in a
get_campaign_graphresponse, and a strict decoder will reject them.
Need help?
Contact our integration team at [email protected]