Ein Builder für Dialog-Objekte.
Nur für Google Chat-Apps verfügbar. Nicht verfügbar für 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);
Methoden
| Methode | Rückgabetyp | Kurzbeschreibung |
|---|---|---|
set | Dialog | Legt den Aktionsstatus von Dialog fest. |
set | Dialog | Legt das Dialogfeld für die Dialog fest. |
Detaillierte Dokumentation
set Action Status(actionStatus)
Legt den Aktionsstatus von Dialog 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
Dialog – dieses Objekt, zur Verkettung
set Dialog(dialog)
Legt das Dialogfeld für die Dialog 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
Dialog – dieses Objekt, zur Verkettung