Trình tạo cho các đối tượng Chat Accessory.
Tiện ích phụ kiện là những tiện ích có thể tương tác và xuất hiện ở cuối thư.
Dành cho các tiện ích bổ sung của Google Workspace mở rộng Google Chat.
const widget = CardService.newButtonSet() .addButton(CardService.newImageButton() .setIcon(CardService.Icon.PHONE) .setOnClickAction(CardService.newAction() .setFunctionName("phone"))) .addButton(CardService.newTextButton() .setText("Robot") .setIconUrl("https://developers.google.com/chat/images/quickstart-app-avatar.png") .setOnClickAction(CardService.newAction() .setFunctionName("robot"))); const accessoryWidget = AddOnsResponseService.newAccessoryWidget() .addWidget(widget);
Phương thức
| Phương thức | Kiểu dữ liệu trả về | Mô tả ngắn |
|---|---|---|
add | Accessory | Đặt tiện ích cho thao tác này. |
Tài liệu chi tiết
add Widget(widget)
Đặt tiện ích cho thao tác này.
Thông số
| Tên | Loại | Mô tả |
|---|---|---|
widget | Widget | Tiện ích cần đặt. |
Cầu thủ trả bóng
Accessory – Đối tượng này, để liên kết.