Class Dialog

對話方塊

詳情請參閱 Google Chat 說明文件中的「開啟互動式對話方塊」。

Dialog 物件的建構工具。

僅適用於 Google Chat 應用程式。不適用於 Google Workspace 外掛程式。

const card = CardService.newCardBuilder()
    .setHeader(CardService.newCardHeader().setTitle('Card title')).build();

// Sets the card of the dialog.
const dialog = CardService.newDialog()
    .setBody(card);

方法

方法傳回類型簡短說明
setBody(card)Dialog設定 Dialog 的資訊卡。

內容詳盡的說明文件

setBody(card)

設定 Dialog 的資訊卡。

const card = CardService.newCardBuilder()
    .setHeader(CardService.newCardHeader().setTitle('Card title')).build();

// Sets the card of the dialog.
const dialog = CardService.newDialog()
    .setBody(card);

參數

名稱類型說明
cardCard要使用的 Card

回攻員

Dialog:這個物件用於鏈結。