Class ChatResponse

ChatResponse

كائن الرد لرسالة بطاقة في Google Chat.

لا تتوفّر هذه الميزة إلا لتطبيقات Google Chat. لا يتوفّر هذا الخيار لإضافات 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());

الطُرق

الطريقةنوع القيمة التي تم إرجاعهاوصف قصير
printJson()Stringتعرض هذه الطريقة تمثيل JSON لهذا العنصر.

مستندات تفصيلية

printJson()

تعرض هذه الطريقة تمثيل JSON لهذا العنصر. يُستخدم هذا الإعداد لتصحيح الأخطاء فقط.

الإرجاع

String