A builder for DialogAction
objects.
Only available for Google Chat apps. Not available for Google Workspace Add-ons.
const card = CardService.newCardBuilder() .setHeader(CardService.newCardHeader().setTitle('Card title')) .build(); const dialog = CardService.newDialog().setBody(card); const dialogAction = CardService.newDialogAction().setDialog(dialog);
Methods
Method | Return type | Brief description |
---|---|---|
setActionStatus(actionStatus) | DialogAction | Sets the action status of DialogAction . |
setDialog(dialog) | DialogAction | Sets the dialog of the DialogAction . |
Detailed documentation
setActionStatus(actionStatus)
Sets the action status of DialogAction
.
const actionStatus = CardService.newActionStatus().setStatusCode( CardService.Status.OK, ); const dialogAction = CardService.newDialogAction().setActionStatus(actionStatus);
Parameters
Name | Type | Description |
---|---|---|
actionStatus | ActionStatus | The ActionStatus to use. |
Return
DialogAction
— This object, for chaining.
setDialog(dialog)
Sets the dialog of the DialogAction
.
const card = CardService.newCardBuilder() .setHeader(CardService.newCardHeader().setTitle('card title')) .build(); // Sets the card of the dialog. const dialog = CardService.newDialog().setBody(card); const dialogAction = CardService.newDialogAction().setDialog(dialog);
Parameters
Name | Type | Description |
---|---|---|
dialog | Dialog | The Dialog to use. |
Return
DialogAction
— This object, for chaining.