replyDialog
Virtually “presses” a pop-up dialog button displayed by an in-world script.
Bot.replyDialog(channel, object, button);Input
Variable | Required | Description |
|---|---|---|
| yes | The dialog channel (can be a positive or negative value). |
| yes | The UUID of the object that sent the dialog. |
| yes | The text of the dialog button to press. |
Output
Function returns a Promise with the following data:
Variable | Type | Description |
|---|---|---|
| bool | True if command completed successfully |
| string | Error string if command has failed |
Example
Bot.on("script_dialog", function(event) {
Bot.replyDialog(event.channel, event.object_uuid, event.buttons[0]);
console.log("Got a dialog and answered with the first button: " + event.buttons[0]);
});