Skip to content

How to send an Embed? #6

Answered by rigwild
DeadLyBro asked this question in Q&A
Dec 9, 2021 · 2 comments · 7 replies
Discussion options

You must be logged in to vote

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 the embed key in the JSON output.
https://discord.club/dashboard

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: 5…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@DeadLyBro
Comment options

@DeadLyBro
Comment options

@rigwild
Comment options

@bariscodefxy
Comment options

Answer selected by rigwild
Comment options

You must be logged in to vote
3 replies
@rigwild
Comment options

@DeadLyBro
Comment options

@bariscodefxy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants