Ein Builder für DialogAction-Objekte.
Nur für Google Chat-Apps verfügbar. Nicht für Google Workspace-Add‑ons verfügbar.
const card = CardService.newCardBuilder() .setHeader(CardService.newCardHeader().setTitle('Card title')) .build(); const dialog = CardService.newDialog().setBody(card); const dialogAction = CardService.newDialogAction().setDialog(dialog);
Methoden
| Methode | Rückgabetyp | Kurzbeschreibung |
|---|---|---|
set | Dialog | Legt den Aktionsstatus von Dialog fest. |
set | Dialog | Legt den Dialog von Dialog fest. |
Detaillierte Dokumentation
setActionStatus(actionStatus)
Legt den Aktionsstatus von DialogAction fest.
const actionStatus = CardService.newActionStatus().setStatusCode( CardService.Status.OK, ); const dialogAction = CardService.newDialogAction().setActionStatus(actionStatus);
Parameter
| Name | Typ | Beschreibung |
|---|---|---|
action | Action | Der zu verwendende Action. |
Rückflug
DialogAction – Dieses Objekt zur Verkettung.
setDialog(dialog)
Legt den Dialog von DialogAction fest.
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);
Parameter
| Name | Typ | Beschreibung |
|---|---|---|
dialog | Dialog | Der zu verwendende Dialog. |
Rückflug
DialogAction – Dieses Objekt zur Verkettung.