주요 콘텐츠로 건너뛰기

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 in role_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

ResourceChange
create_campaign, update_campaignAdded both nodes to the graph.nodes discriminator and oneOf
update_campaign_graphAdded both nodes to the graph nodes discriminator and oneOf on the request
get_campaign_graphAdded 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 nodes map with model_type set to GrantDiscordRoleNode or RemoveDiscordRoleNode and role_id set 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_graph response, and a strict decoder will reject them.

도움이 필요하세요?
통합팀에 문의하십시오 [email protected]