Voznest Forge

Workspace

WorkspaceProjects

Development

DocsAPI ReferenceSDKsEmbed StudioChangelog
  1. Forge
  2. /Docs

Start here

Getting StartedQuickstartPlatform ConceptsEnvironments

Build

ProjectsIdentityAgentsGatewayCapabilitiesPermissions ReferenceInstallationsLive activity

Commands & interactions

CommandsContext-menu CommandsInteractionsComponentsModals (Forms)Activities (Embedded Apps)

Acting in hubs

MessagesEmbedsEmbeds v2 (Blocks)Embeds v3Incoming WebhooksHub Management APIEvent StreamDelivery

Sign in with Voznest

AccessOpenID Connect

API

APIAuthenticationErrorsRate LimitsSecurity

Publish & operate

App Market & ListingTemplates & SandboxObservability & Team Tools

Tools

SDKsExamplesFAQ & TroubleshootingReference

Commands & interactions

Commands

Slash commands, interactions and components.

Members type / to find commands. Voznest validates every parameter and permission, then gives the handling agent an INTERACTION_CREATE with a token. Answer within 5 seconds (or defer and answer within 15 minutes).

Global commands reach every hub the project is installed in; hub commands exist only in one hub. Commands have a group and a position (the order in the / menu) and can carry localized descriptions shown according to the member's language.

Declaring commands

json
[  {    "name": "remind",    "description": "Remind yourself later",    "options": [      {        "type": "string",        "name": "what",        "description": "What to remember",        "required": true,        "maxLength": 200      },      {        "type": "integer",        "name": "minutes",        "description": "In how many minutes",        "required": true,        "minValue": 1,        "maxValue": 1440      }    ]  },  {    "name": "clear",    "description": "Delete recent messages",    "requiredPermission": "manageMessages",    "options": [      {        "type": "integer",        "name": "count",        "description": "How many",        "required": true,        "minValue": 1,        "maxValue": 50      }    ]  }]
Option typeValue you receiveValidation by Voznest
stringtextmaxLength (≤ 6000), choices (≤ 25)
integerwhole numberminValue / maxValue, choices
numbernumberminValue / maxValue, choices
booleantrue / false—
useruser id (+ resolved.users)must be a member of the hub
channelchannel id (+ resolved.channels)must be a channel of the hub
rolerole id (+ resolved.roles)must be a role of the hub
LimitValue
Commands per scope (global, or per hub)100
Namea-z 0-9 _ -, 1–32 (context-menu commands: see Context menus)
Description1–100 characters; up to 30 localized descriptions
Options per command25 — required options first, unique names
requiredPermissionany key from the Permissions Reference

Replace the whole global list with PUT /applications/:id/commands, or one hub's list with PUT /applications/:id/servers/:hubId/commands. From CI, use an API key with PUT /projects/@self/commands.

Publishing and versions

Each publish in the portal stores a snapshot. Roll back to any previous version from Commands → Versions; the rollback itself is a new version, so nothing is lost.

Answering

ts
// Answer every interaction your bot receives.gateway.on("event", async ({ t, d }) => {  if (t !== "INTERACTION_CREATE") return;  const reply = (type, data) =>    fetch(`${API}/api/v1/interactions/${d.id}/${d.token}/callback`, {      method: "POST",      headers: { ...auth, "Content-Type": "application/json" },      body: JSON.stringify({ type, data }),    });  if (d.type === "command" && d.data.name === "vote") {    return reply("reply", {      embeds: [{ title: "Pizza or tacos?", color: "#7c5cff" }],      components: [{ type: "row", components: [        { type: "button", style: "primary", label: "Pizza", emoji: "🍕", customId: "vote:pizza" },        { type: "button", style: "success", label: "Tacos", emoji: "🌮", customId: "vote:tacos" },      ] }],    });  }  if (d.type === "component" && d.data.customId.startsWith("vote:")) {    return reply("reply", { content: `You picked ${d.data.customId.slice(5)}!`, ephemeral: true });  }});
reply

Post a message in the channel (content, embeds, components). Add ephemeral: true to show it only to the member. Can be called again as a follow-up for 15 minutes.

defer

Acknowledge now (the member sees “… is working on it”) and reply later within 15 minutes.

update

Component interactions only: edit the message the button or menu belongs to.

modal

First answer only: open a form (1–5 text fields). The submission arrives as a new modal_submit interaction.

Components

json
{  "components": [    { "type": "row", "components": [      { "type": "button", "style": "primary | secondary | success | danger", "label": "Accept", "emoji": "✅", "customId": "accept" },      { "type": "button", "style": "link", "label": "Docs", "url": "https://example.com" }    ] },    { "type": "row", "components": [      { "type": "select", "customId": "color", "placeholder": "Pick colors", "minValues": 1, "maxValues": 2,        "options": [{ "label": "Violet", "value": "violet", "emoji": "💜" }, { "label": "Cyan", "value": "cyan" }] }    ] }  ]}

Each environment is answered by its own agent: a command used in a test hub goes to the Development or Staging agent installed there, never to Production. Full details of the lifecycle, forms and right-click commands: Interactions, Modals, Context menus.

PreviousInstallationsNext Context-menu Commands