Class ChatMessage

SohbetMesaj

Google Chat mesajı

Google Chat'i genişleten Google Workspace eklentileri için kullanılabilir.

const card = CardService.newCardBuilder()
    .setHeader(CardService.newCardHeader().setTitle("Card Title"))
    .addSection(CardService.newCardSection()
      .addWidget(CardService.newTextParagraph().setText("Text paragraph")))
    .build();

const cardWithId = CardService.newCardWithId().setCardId("card_one").setCard(card);

const message = AddOnsResponseService.newChatMessage().addCardWithId(cardWithId);

Yöntemler

YöntemDönüş türüKısa açıklama
addCardWithId(cardWithId)ChatMessageİletinin kartını ayarlar.
setText(text)ChatMessageİletinin metnini ayarlar.

Ayrıntılı belgeler

addCardWithId(cardWithId)

İletinin kartını ayarlar.

const card = CardService.newCardBuilder()
    .setHeader(CardService.newCardHeader().setTitle("Card Title"))
    .addSection(CardService.newCardSection()
      .addWidget(CardService.newTextParagraph().setText("Text paragraph")))
    .build();

const cardWithId = CardService.newCardWithId().setCardId("card_one").setCard(card);

const message = AddOnsResponseService.newChatMessage().addCardWithId(cardWithId);

Parametreler

AdTürAçıklama
cardWithIdCardWithIdAyarlanacak cardWithId.

Return

ChatMessage: Zincirleme için bu nesne.


setText(text)

İletinin metnini ayarlar.

const message = AddOnsResponseService.newChatMessage().setText("Example text");

Parametreler

AdTürAçıklama
textStringİletinin metin kısmı.

Return

ChatMessage: Zincirleme için bu nesne.