Get dialog
Это руководство доступно только на английском.
Полезна ли эта страница?
Это руководство доступно только на английском.
Полезна ли эта страница?
Returns the currently displayed server dialog (Minecraft 1.21.6+). Dialogs are server-sent UI screens for custom interactions. Returns empty response if no dialog is being shown. Does not require the bot to be online (but dialog will be absent).
AuthorizationBearer <JWT>Preferred API authentication. Use a JWT with the api audience.
instance_id*stringThe UUID of the SoulFire instance containing the bot.
uuidbot_id*stringThe profile UUID of the bot to get dialog for.
uuidResponse containing the current dialog state.
application/jsonResponse containing the current dialog state.
dialog?|The currently displayed dialog. Absent if no dialog is being shown.
curl -X GET 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/dialog'{ "dialog": { "id": "string", "type": "DIALOG_TYPE_UNSPECIFIED", "title": "string", "externalTitle": "string", "body": [ { "plainMessage": { "contents": "string", "width": 0 }, "item": { "itemId": "string", "count": 0, "description": "string", "showDecoration": true, "showTooltip": true, "width": 0, "height": 0 } } ], "inputs": [ { "text": { "key": "string", "label": "string", "width": 0, "labelVisible": true, "initial": "string", "maxLength": 0, "multiline": true, "multilineMaxLines": 0, "multilineHeight": 0 }, "boolean": { "key": "string", "label": "string", "initial": true, "onTrue": "string", "onFalse": "string" }, "singleOption": { "key": "string", "label": "string", "labelVisible": true, "width": 0, "options": [ { "id": "string", "display": "string" } ], "initialOptionId": "string" }, "numberRange": { "key": "string", "label": "string", "labelFormat": "string", "width": 0, "start": 0.1, "end": 0.1, "step": 0.1, "initial": 0.1 } } ], "canCloseWithEscape": true, "pause": true, "afterAction": "DIALOG_AFTER_ACTION_UNSPECIFIED", "action": { "label": "string", "tooltip": "string", "width": 0, "action": { "openUrl": { "url": "http://example.com" }, "runCommand": { "command": "string" }, "suggestCommand": { "command": "string" }, "copyToClipboard": { "value": "string" }, "showDialog": { "dialogId": "string" }, "custom": { "id": "string", "payload": "string" }, "dynamicRunCommand": { "template": "string" }, "dynamicCustom": { "id": "string", "additions": "string" } } }, "yes": { "label": "string", "tooltip": "string", "width": 0, "action": { "openUrl": { "url": "http://example.com" }, "runCommand": { "command": "string" }, "suggestCommand": { "command": "string" }, "copyToClipboard": { "value": "string" }, "showDialog": { "dialogId": "string" }, "custom": { "id": "string", "payload": "string" }, "dynamicRunCommand": { "template": "string" }, "dynamicCustom": { "id": "string", "additions": "string" } } }, "no": { "label": "string", "tooltip": "string", "width": 0, "action": { "openUrl": { "url": "http://example.com" }, "runCommand": { "command": "string" }, "suggestCommand": { "command": "string" }, "copyToClipboard": { "value": "string" }, "showDialog": { "dialogId": "string" }, "custom": { "id": "string", "payload": "string" }, "dynamicRunCommand": { "template": "string" }, "dynamicCustom": { "id": "string", "additions": "string" } } }, "actions": [ { "label": "string", "tooltip": "string", "width": 0, "action": { "openUrl": { "url": "http://example.com" }, "runCommand": { "command": "string" }, "suggestCommand": { "command": "string" }, "copyToClipboard": { "value": "string" }, "showDialog": { "dialogId": "string" }, "custom": { "id": "string", "payload": "string" }, "dynamicRunCommand": { "template": "string" }, "dynamicCustom": { "id": "string", "additions": "string" } } } ], "columns": 0, "exitAction": { "label": "string", "tooltip": "string", "width": 0, "action": { "openUrl": { "url": "http://example.com" }, "runCommand": { "command": "string" }, "suggestCommand": { "command": "string" }, "copyToClipboard": { "value": "string" }, "showDialog": { "dialogId": "string" }, "custom": { "id": "string", "payload": "string" }, "dynamicRunCommand": { "template": "string" }, "dynamicCustom": { "id": "string", "additions": "string" } } }, "buttonWidth": 0 }}curl -X GET 'http://127.0.0.1:38765/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/bots/497f6eca-6276-4993-bfeb-53cbbbba6f08/dialog'{
"dialog": {
"id": "string",
"type": "DIALOG_TYPE_UNSPECIFIED",
"title": "string",
"externalTitle": "string",
"body": [
{
"plainMessage": {
"contents": "string",
"width": 0
},
"item": {
"itemId": "string",
"count": 0,
"description": "string",
"showDecoration": true,
"showTooltip": true,
"width": 0,
"height": 0
}
}
],
"inputs": [
{
"text": {
"key": "string",
"label": "string",
"width": 0,
"labelVisible": true,
"initial": "string",
"maxLength": 0,
"multiline": true,
"multilineMaxLines": 0,
"multilineHeight": 0
},
"boolean": {
"key": "string",
"label": "string",
"initial": true,
"onTrue": "string",
"onFalse": "string"
},
"singleOption": {
"key": "string",
"label": "string",
"labelVisible": true,
"width": 0,
"options": [
{
"id": "string",
"display": "string"
}
],
"initialOptionId": "string"
},
"numberRange": {
"key": "string",
"label": "string",
"labelFormat": "string",
"width": 0,
"start": 0.1,
"end": 0.1,
"step": 0.1,
"initial": 0.1
}
}
],
"canCloseWithEscape": true,
"pause": true,
"afterAction": "DIALOG_AFTER_ACTION_UNSPECIFIED",
"action": {
"label": "string",
"tooltip": "string",
"width": 0,
"action": {
"openUrl": {
"url": "http://example.com"
},
"runCommand": {
"command": "string"
},
"suggestCommand": {
"command": "string"
},
"copyToClipboard": {
"value": "string"
},
"showDialog": {
"dialogId": "string"
},
"custom": {
"id": "string",
"payload": "string"
},
"dynamicRunCommand": {
"template": "string"
},
"dynamicCustom": {
"id": "string",
"additions": "string"
}
}
},
"yes": {
"label": "string",
"tooltip": "string",
"width": 0,
"action": {
"openUrl": {
"url": "http://example.com"
},
"runCommand": {
"command": "string"
},
"suggestCommand": {
"command": "string"
},
"copyToClipboard": {
"value": "string"
},
"showDialog": {
"dialogId": "string"
},
"custom": {
"id": "string",
"payload": "string"
},
"dynamicRunCommand": {
"template": "string"
},
"dynamicCustom": {
"id": "string",
"additions": "string"
}
}
},
"no": {
"label": "string",
"tooltip": "string",
"width": 0,
"action": {
"openUrl": {
"url": "http://example.com"
},
"runCommand": {
"command": "string"
},
"suggestCommand": {
"command": "string"
},
"copyToClipboard": {
"value": "string"
},
"showDialog": {
"dialogId": "string"
},
"custom": {
"id": "string",
"payload": "string"
},
"dynamicRunCommand": {
"template": "string"
},
"dynamicCustom": {
"id": "string",
"additions": "string"
}
}
},
"actions": [
{
"label": "string",
"tooltip": "string",
"width": 0,
"action": {
"openUrl": {
"url": "http://example.com"
},
"runCommand": {
"command": "string"
},
"suggestCommand": {
"command": "string"
},
"copyToClipboard": {
"value": "string"
},
"showDialog": {
"dialogId": "string"
},
"custom": {
"id": "string",
"payload": "string"
},
"dynamicRunCommand": {
"template": "string"
},
"dynamicCustom": {
"id": "string",
"additions": "string"
}
}
}
],
"columns": 0,
"exitAction": {
"label": "string",
"tooltip": "string",
"width": 0,
"action": {
"openUrl": {
"url": "http://example.com"
},
"runCommand": {
"command": "string"
},
"suggestCommand": {
"command": "string"
},
"copyToClipboard": {
"value": "string"
},
"showDialog": {
"dialogId": "string"
},
"custom": {
"id": "string",
"payload": "string"
},
"dynamicRunCommand": {
"template": "string"
},
"dynamicCustom": {
"id": "string",
"additions": "string"
}
}
},
"buttonWidth": 0
}
}