Fix embed formatting for author name and hyphen condition.
This commit is contained in:
parent
7411648d02
commit
d877097517
1 changed files with 2 additions and 2 deletions
|
@ -15,8 +15,8 @@ export function formatMessage(message: DiscordMessage): string {
|
||||||
for (const embed of message.embeds) {
|
for (const embed of message.embeds) {
|
||||||
rvalue += ` [Embed:`;
|
rvalue += ` [Embed:`;
|
||||||
rvalue += embed.title ? ` ${embed.title}` : "";
|
rvalue += embed.title ? ` ${embed.title}` : "";
|
||||||
rvalue += embed.author ? ` by ${embed.author}` : "";
|
rvalue += embed.author ? ` by ${embed.author.name}` : "";
|
||||||
rvalue += embed.title || embed.author ? " -": "";
|
rvalue += (embed.title || embed.author) && embed.description ? " -": "";
|
||||||
rvalue += embed.description ? ` ${embed.description}` : "";
|
rvalue += embed.description ? ` ${embed.description}` : "";
|
||||||
rvalue += "]";
|
rvalue += "]";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue