Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
ResponseType
Một enum đại diện cho loại phản hồi của ứng dụng Chat.
Chỉ dành cho ứng dụng Google Chat. Không dùng được cho các tiện ích bổ sung của Google Workspace.
Để gọi một enum, bạn gọi lớp mẹ, tên và thuộc tính của enum đó. Ví dụ:
CardService.Type.DIALOG.
Thuộc tính
Thuộc tính
Loại
Mô tả
TYPE_UNSPECIFIED
Enum
Loại mặc định được xử lý dưới dạng NEW_MESSAGE.
NEW_MESSAGE
Enum
Đăng dưới dạng tin nhắn mới trong chủ đề.
UPDATE_MESSAGE
Enum
Cập nhật tin nhắn của ứng dụng Chat. Điều này chỉ được phép trên sự kiện CARD_CLICKED, trong đó loại trình gửi thông báo là BOT.
UPDATE_USER_MESSAGE_CARDS
Enum
Cập nhật thẻ trên tin nhắn của người dùng. Bạn chỉ được phép thực hiện việc này để phản hồi một sự kiện MESSAGE có URL được so khớp hoặc một sự kiện CARD_CLICKED mà loại trình gửi thông báo là HUMAN. Văn bản sẽ bị bỏ qua.
REQUEST_CONFIG
Enum
Yêu cầu người dùng xác thực hoặc định cấu hình thêm một cách riêng tư.
DIALOG
Enum
Hiển thị hộp thoại.
UPDATE_WIDGET
Enum
Truy vấn các tuỳ chọn tự động hoàn thành văn bản tiện ích.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eResponseType\u003c/code\u003e is an enum used to define the type of response a Google Chat app sends.\u003c/p\u003e\n"],["\u003cp\u003eIt is exclusively for Google Chat apps and is not applicable to Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eResponseType\u003c/code\u003e properties specify actions like posting new messages, updating existing ones, requesting user configuration, and displaying dialogs.\u003c/p\u003e\n"],["\u003cp\u003eUpdating cards on user messages or the Chat app's message depends on specific event triggers and sender types.\u003c/p\u003e\n"],["\u003cp\u003eTo call an enum property, use its parent class, name, and the specific property (e.g., \u003ccode\u003eCardService.Type.DIALOG\u003c/code\u003e).\u003c/p\u003e\n"]]],["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"],null,["# Enum ResponseType\n\nResponseType\n\nAn enum that represents the type of Chat app response.\n\nOnly available for Google Chat apps. Not available for Google Workspace add-ons.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.Type.DIALOG`. \n\n### Properties\n\n| Property | Type | Description |\n|-----------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `TYPE_UNSPECIFIED` | `Enum` | Default type that's handled as `NEW_MESSAGE`. |\n| `NEW_MESSAGE` | `Enum` | Post as a new message in the topic. |\n| `UPDATE_MESSAGE` | `Enum` | Update the Chat app's message. This is only permitted on a `CARD_CLICKED` event where the message sender type is `BOT`. |\n| `UPDATE_USER_MESSAGE_CARDS` | `Enum` | Update the cards on a user's message. This is only permitted as a response to a `MESSAGE` event with a matched URL, or a `CARD_CLICKED` event where the message sender type is `HUMAN`. Text is ignored. |\n| `REQUEST_CONFIG` | `Enum` | Privately ask the user for additional authentication or configuration. |\n| `DIALOG` | `Enum` | Presents a dialog. |\n| `UPDATE_WIDGET` | `Enum` | Widget text autocomplete options query. |"]]