Skip to content

Commit

Permalink
feat(discord): raw embed
Browse files Browse the repository at this point in the history
  • Loading branch information
XxLittleCxX committed Mar 15, 2021
1 parent ae3f004 commit 22dc774
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/adapter-discord/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,12 @@ export interface Embed {
name?: string;
url?: string;
}

fields?: {
name: string
value: string
inline?: boolean
}[]
}

export interface Attachment {
Expand Down
1 change: 1 addition & 0 deletions packages/adapter-discord/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export async function adaptMessage(bot: DiscordBot, meta: DC.DiscordMessage, ses
session.content += segment('video', { url: embed.video.url, proxy_url: embed.video.proxy_url })
}
}
session.content = meta.embeds.map(v => segment('embed', { data: JSON.stringify(v) })).join('') + session.content
return session
}

Expand Down

0 comments on commit 22dc774

Please sign in to comment.