-
Can you write how to send embed? Let others benefit as well. Note: I just edit, nothing new. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
EDIT: SENDING EMBEDS AS A USER ACCOUNT IS NOT POSSIBLE ANYMORE, DISCORD UPDATED ITS API (see this reddit post) Looks like the issue is the color, you need to send an integer (see https://discord.com/developers/docs/resources/channel#embed-object-embed-structure). I found this nice embed generator online. Click I updated the API to accept a full embed (f9d15bd). api = {
sendEmbed: (channelId, embed = { title: 'Title', description: 'Description' }) => apiCall(`/channels/${channelId}/messages`, { embed }, 'POST')
} Full example: id()
const embed = {
title: 'Title',
color: 5022192,
description: 'Description',
timestamp: '2021-12-09T13:32:00.000Z',
url: 'https://url.url/',
author: {
name: 'Author',
url: 'https://author.url/',
icon_url: 'https://picsum.photos/200'
},
image: {
url: 'https://picsum.photos/200'
},
thumbnail: {
url: 'https://picsum.photos/50'
},
footer: {
text: 'Footer',
icon_url: 'https://picsum.photos/20'
},
fields: [
{
name: 'Field1_key',
value: 'Field1_value'
},
{
name: 'Field2_key',
value: 'Field2_value',
inline: true
}
]
}
await api.sendEmbed(cid, embed)
// or
await api.apiCall(`/channels/${cid}/messages`, { embed }, 'POST') Output: |
Beta Was this translation helpful? Give feedback.
-
Yes, Discord updated its API but still you can send embeds. How? Let's explain. I found a embed generator that can give an customizable embed url. When u send it to Discord u can see your embed message. The Generator Website: https://embedl.ink/ You can customize your embed with GET parameters like this: https://embedl.ink/?deg&provider=&providerurl=&author=&authorurl=&title=&color=%23000000&media=none&mediaurl=&desc= |
Beta Was this translation helpful? Give feedback.
EDIT:
SENDING EMBEDS AS A USER ACCOUNT IS NOT POSSIBLE ANYMORE, DISCORD UPDATED ITS API (see this reddit post)
Looks like the issue is the color, you need to send an integer (see https://discord.com/developers/docs/resources/channel#embed-object-embed-structure).
I found this nice embed generator online. Click
+
at the bottom in the embed section then copy theembed
key in the JSON output.https://discord.club/dashboard
I updated the API to accept a full embed (f9d15bd).
Full example: