diff --git a/src/toOpenAIMessages.ts b/src/toOpenAIMessages.ts index 1e89867..423cadc 100644 --- a/src/toOpenAIMessages.ts +++ b/src/toOpenAIMessages.ts @@ -15,8 +15,8 @@ export function formatMessage(message: DiscordMessage): string { for (const embed of message.embeds) { rvalue += ` [Embed:`; rvalue += embed.title ? ` ${embed.title}` : ""; - rvalue += embed.author ? ` by ${embed.author}` : ""; - rvalue += embed.title || embed.author ? " -": ""; + rvalue += embed.author ? ` by ${embed.author.name}` : ""; + rvalue += (embed.title || embed.author) && embed.description ? " -": ""; rvalue += embed.description ? ` ${embed.description}` : ""; rvalue += "]"; }