ensure embed values aren't empty
This commit is contained in:
@@ -105,7 +105,8 @@ function applyEmbedChildren(embed: APIEmbed, children: Node[]) {
|
|||||||
embed.fields ??= []
|
embed.fields ??= []
|
||||||
embed.fields.push({
|
embed.fields.push({
|
||||||
name: child.findInstanceOf(EmbedFieldNameNode)?.extractText() ?? "",
|
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,
|
inline: child.props.inline,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user