Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
Enum ResponseType
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
ResponseType
列舉代表 Chat 應用程式的回應類型。
僅適用於 Google Chat 擴充應用程式。不適用於 Google Workspace 外掛程式。
如要呼叫列舉,請呼叫其父項類別、名稱和屬性。例如
CardService.Type.DIALOG。
屬性
| 屬性 | 類型 | 說明 |
TYPE_UNSPECIFIED | Enum | 預設類型,會以 NEW_MESSAGE 處理。 |
NEW_MESSAGE | Enum | 以新訊息的形式發布到主題。 |
UPDATE_MESSAGE | Enum | 更新 Chat 應用程式的訊息。只有在 CARD_CLICKED 事件中,且訊息傳送者類型為 BOT 時,才允許這麼做。 |
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 和/或其關聯企業的註冊商標。
上次更新時間:2026-04-13 (世界標準時間)。
[null,null,["上次更新時間:2026-04-13 (世界標準時間)。"],[],["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"]]