# 채널로 메세지 발송

## UI 소개

{% tabs %}
{% tab title="자동화" %}

<figure><img src="https://1362923181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5PH5ktGI0BWG6g9fvtcn%2Fuploads%2FUBmDjBRyls8rCKoXhIrN%2FScreenshot%200006-12-30%20at%206.26.11%E2%80%AFPM.png?alt=media&#x26;token=d0c9f5e2-48f9-440c-bc6d-7f5a4344c8ad" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="데이터플로우" %}

<figure><img src="https://1362923181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5PH5ktGI0BWG6g9fvtcn%2Fuploads%2FjWug9zc09UzTZ9KVmej7%2FScreenshot%200006-12-30%20at%206.25.52%E2%80%AFPM.png?alt=media&#x26;token=b3ea8df5-f9d1-4139-b6b1-3945e6929c4a" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

<table><thead><tr><th width="137" align="center">항목명</th><th width="292" align="center">항목소개</th><th align="center">비고</th></tr></thead><tbody><tr><td align="center">채널 ID</td><td align="center">메세지를 보낼 채널 ID</td><td align="center"></td></tr><tr><td align="center">메세지 내용</td><td align="center">채널에 전송할 메세지 내용 </td><td align="center"></td></tr><tr><td align="center">임베드 정보 삽입 여부 선택</td><td align="center">카드 형태의 메세지 첨부 여부</td><td align="center"><p>설정시 JSON Array 형태</p><p>(예시 하단 내용 참조)</p></td></tr><tr><td align="center">메세지 컴포넌트 삽입 여부</td><td align="center">상호작용 가능한 컴포넌트(버튼 등) 삽입 여부</td><td align="center"><p>설정시 JSON Array 형태</p><p>(예시 하단 내용 참조)</p></td></tr><tr><td align="center">TTS 음성 사용 여부</td><td align="center">메세지 전송시 내용을 TTS 음성으로 읽을지 여부</td><td align="center"></td></tr></tbody></table>

{% hint style="info" %}
임베드는 카드 형태의 메세지이며 여러개의 임베드를 가질 수 있습니다.&#x20;
{% endhint %}

<figure><img src="https://1362923181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5PH5ktGI0BWG6g9fvtcn%2Fuploads%2FOPW6ZdZghxx6yHWxs2X2%2FScreenshot%200006-11-21%20at%209.50.10%E2%80%AFPM.png?alt=media&#x26;token=afd4939c-099f-4d1d-ba4c-f0141ba667f4" alt=""><figcaption></figcaption></figure>

```
// 임베드 코드 예시 
[
  {
    "title": "Welcome to the Server!",  // 임베딩 제목 
    "description": "We're glad to have you here, Feel free to explore and ask question!", // 임베딩 상세 정보 
    "color": 3447003 // 임베딩 왼쪽 라인 색상 
  }
]  
// 배열 형태이며 여러개의 임베드를 가질 수 있음
// 임베드 추가 옵션 문서 링크 참조 
// https://discord.com/developers/docs/resources/message#embed-object 
```

{% hint style="info" %}
메세지 컴포넌트는 상호작용이 가능한 컴포넌트를  메세지에 첨부가 가능합니다.&#x20;
{% endhint %}

<figure><img src="https://1362923181-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5PH5ktGI0BWG6g9fvtcn%2Fuploads%2F6sqsai3BLlhIQbGaFaq1%2FScreenshot%200006-11-21%20at%209.51.05%E2%80%AFPM.png?alt=media&#x26;token=23a14d1c-84b9-4e7d-9a45-1b93a0f24737" alt=""><figcaption></figcaption></figure>

```
// 컴포넌트 설정시 코드 예시 
[
    {
        "type": 1, // 컴포넌트 형태 (1 : Action Row, 컴포넌트를 그룹화함) 
        "components": [  // 액션 행 내부에 포함된 실제 컴포넌트 배열
            {
                "type": 2, // 클릭 가능한 버튼 타입 
                "label": "Click Me!", // 라벨명 
                "style": 1, // 버튼 스타일 
                "custom_id": "button_click" // 커스텀 버튼 ID 
            }
        ]
    }
]

// 배열 형태로 여러개의 컴포넌트를 가질 수 있음 
// 컴포넌트 추가 옵션 링크 문서 참조 
// https://discord.com/developers/docs/interactions/message-components#component-object
```
