ensure embed values aren't empty

This commit is contained in:
itsMapleLeaf
2022-08-06 00:05:10 -05:00
parent d5617fd1b5
commit e974f0073d

View File

@@ -105,7 +105,8 @@ function applyEmbedChildren(embed: APIEmbed, children: Node[]) {
embed.fields ??= []
embed.fields.push({
name: child.findInstanceOf(EmbedFieldNameNode)?.extractText() ?? "",
value: child.findInstanceOf(EmbedFieldValueNode)?.extractText() ?? "",
value:
child.findInstanceOf(EmbedFieldValueNode)?.extractText() || "_ _", // can't send an empty string
inline: child.props.inline,
})
}