diff --git a/packages/adapter-discord/src/types.ts b/packages/adapter-discord/src/types.ts index a9e9296331..a30afad7ac 100644 --- a/packages/adapter-discord/src/types.ts +++ b/packages/adapter-discord/src/types.ts @@ -159,6 +159,12 @@ export interface Embed { name?: string; url?: string; } + + fields?: { + name: string + value: string + inline?: boolean + }[] } export interface Attachment { diff --git a/packages/adapter-discord/src/utils.ts b/packages/adapter-discord/src/utils.ts index 349bd674bb..24a818796b 100644 --- a/packages/adapter-discord/src/utils.ts +++ b/packages/adapter-discord/src/utils.ts @@ -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 }