채널
Discord
에이전트가 업리카로 디스코드 채널에 올리는 방법. 글 채널 하나에 만드는 웹후크, 기본으로 아무도 안 울리는 멘션, 그리고 웹후크가 못 하는 것.
한눈에
| 이름 | 타입 | 설명 |
|---|---|---|
characters | text | 2,000 |
images | media | up to 10 per post; more than that and the first 10 go out with a warning |
carousel | media | 2-10 items, images and video can be mixed |
video | media | 10 per post |
text alone | media | allowed |
posts / 24h | limit | 28,800 |
deletes / 24h | limit | Discord only deletes messages this webhook sent, with no documented daily cap |
status | state | live |
이 숫자는 서버가 검증에 쓰는 파일에서 그대로 옵니다. 메시지 하나에 2,000자와 첨부 10개까지 들어갑니다. 글자는 코드포인트로 세서 이모지도 한 글자이고, 첨부는 한 개에 20MB 까지입니다.
@everyone 을 썼는데 왜 아무도 알림을 못 받았나요?
업리카는 따로 말하지 않으면 디스코드 메시지의 멘션을 꺼서 보냅니다. @everyone · @here · 역할 · 사람 멘션이 글자로만 보이고 아무도 안 울립니다. 에이전트가 실수로 서버 전체를 깨우지 않게 하려는 것입니다. 멘션한 사람에게 알리려면 options.discord.mentions 를 users 로, 역할 · @everyone · @here 까지 알리려면 all 로 줍니다.
첫 글은 어떻게 올리나요?
본문이나 첨부, 또는 둘 다로 publish 를 부릅니다. 디스코드가 마크다운을 직접 그려서 굵게 · 목록 · 링크가 쓴 대로 보입니다.
curl -X POST https://api.uplika.com/v1/posts \
-H "Authorization: Bearer $UPLIKA_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Release notes are up. **v2.4** ships today.",
"accountIds": ["conn_..."],
"options": { "discord": { "silent": true } }
}'options.discord 가 받는 것
| 이름 | 타입 | 설명 |
|---|---|---|
username | string | The sender name shown on this one message, 1-80 characters. Leave it out to use the webhook's own name. Discord rejects names that contain "discord" or "clyde". |
silent | boolean | Post without sending a push or desktop notification (Discord's @silent). |
suppressEmbeds | boolean | Do not show link previews for URLs in the text. |
mentions | none | users | all | Who a mention in the text actually notifies. none (default): nobody, so @everyone, @here and role or user mentions show as text but ping no one. users: mentioned people only. all: people, roles, @everyone and @here. Only choose all when the person asked to notify the whole server. |
content | string | Text for this channel only. When set it replaces the shared content for this channel, and the length and media checks use it. Leave it out to use the shared content. |
전부 선택입니다. 다른 채널처럼 content, 이 채널에만 나가는 다른 본문도 받습니다.
안 되는 것은?
답글, 댓글, 채널 메시지 목록. 웹후크는 올리기만 하고 채널을 읽지 못해서 list_replies · reply · list_channel_posts 는 못 한다고 답합니다. 수정은 본문만 바꾸고 첨부는 그대로 둡니다. 삭제는 이 웹후크가 보낸 메시지만 됩니다. 지표는 반응 수 합계 하나입니다.
자주 묻는 것
업리카가 내 디스코드 계정이나 서버를 보나요?
아니요. 내가 만든 웹후크 URL 을 봉해 두고 그것으로 올립니다. 웹후크는 자기 채널 하나에 올리는 것만 할 수 있고 메시지나 멤버를 읽지 못합니다.
디스코드에서 웹후크를 지우면 어떻게 되나요?
다음 발행이 실패하고 연결이 만료로 바뀝니다. 웹후크를 새로 만들고 그 URL 로 다시 연결하세요. 업리카에서 연결을 해제해도 디스코드의 웹후크는 안 지워집니다. 더 안 쓰면 디스코드에서 지우세요.
포럼 채널은 왜 거절되나요?
포럼 채널과 미디어 채널은 글마다 새 스레드를 열어야 하는데 업리카는 스레드를 만들지 않습니다. 일반 글 채널에 웹후크를 만들어 주세요.