Enum ResponseType
回應類型
列舉代表 Chat 應用程式回應類型。
僅適用於 Google Chat 應用程式。不適用於 Google Workspace 外掛程式。
如要呼叫列舉,請呼叫其父項類別、名稱和屬性。例如
CardService.Type.DIALOG
。
屬性
屬性 | 類型 | 說明 |
TYPE_UNSPECIFIED | Enum | 以 NEW_MESSAGE 處理的預設類型。 |
NEW_MESSAGE | Enum | 在主題中發布新訊息。 |
UPDATE_MESSAGE | Enum | 更新 Chat 應用程式的訊息。這項操作僅適用於訊息傳送者類型為 BOT 的 CARD_CLICKED 事件。 |
UPDATE_USER_MESSAGE_CARDS | Enum | 更新使用者訊息中的資訊卡。這項操作僅適用於回應含有相符網址的 MESSAGE 事件,或是訊息傳送者類型為 HUMAN 的 CARD_CLICKED 事件。系統會忽略文字。 |
REQUEST_CONFIG | Enum | 私下要求使用者進行額外驗證或設定。 |
DIALOG | Enum | 顯示對話方塊。 |
UPDATE_WIDGET | Enum | 小工具文字自動完成選項查詢。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-01-30 (世界標準時間)。
[null,null,["上次更新時間:2025-01-30 (世界標準時間)。"],[[["`ResponseType` is an enum used to define the type of response a Google Chat app sends."],["It is exclusively for Google Chat apps and is not applicable to Google Workspace Add-ons."],["`ResponseType` properties specify actions like posting new messages, updating existing ones, requesting user configuration, and displaying dialogs."],["Updating cards on user messages or the Chat app's message depends on specific event triggers and sender types."],["To call an enum property, use its parent class, name, and the specific property (e.g., `CardService.Type.DIALOG`)."]]],["The `ResponseType` enum defines how a Google Chat app responds. Available responses include `NEW_MESSAGE` (post a new message), `UPDATE_MESSAGE` (update the app's message, only for bot-initiated events), and `UPDATE_USER_MESSAGE_CARDS` (update cards on a user's message for human or URL-matched events). Other options: `REQUEST_CONFIG` (ask for user config), `DIALOG` (present a dialog), `UPDATE_WIDGET` (widget autocomplete query), and the default `TYPE_UNSPECIFIED` which is handled as `NEW_MESSAGE`.\n"]]