Class ChatResponse

ChatResponse

Đối tượng phản hồi của tin nhắn thẻ trong Google Chat.

Chỉ dành cho các ứng dụng Google Chat. Không sử dụng được với tiện ích bổ sung của Google Workspace.

// Creates a card message in Chat.
const cardHeader = CardService.newCardHeader()
    .setTitle('Card Header Title')
    .setSubtitle('Card Header Subtitle');

const card = CardService.newCardBuilder()
    .setHeader(cardHeader)
    .build();

const chatResponse = CardService.newChatResponseBuilder()
    .setText('Example text')
    .addCardsV2(CardService.newCardWithId()
       .setCardId('card_id')
       .setCard(card))
    .build();

console.log(chatResponse.printJson());

Phương thức

Phương thứcKiểu dữ liệu trả vềMô tả ngắn
printJson()StringIn bản trình bày JSON của đối tượng này.

Tài liệu chi tiết

printJson()

In bản trình bày JSON của đối tượng này. Thao tác này chỉ nhằm gỡ lỗi.

Cầu thủ trả bóng

String