Try to fix bot crash

This commit is contained in:
PandaNinjas 2023-01-17 08:27:55 -08:00
parent 90fbd3f717
commit c2ad28c36d
No known key found for this signature in database
GPG key ID: 0BD7553044D47763

View file

@ -53,8 +53,10 @@ export async function expandDiscordLink(message: Message): Promise<void> {
name: `${messageToShow.author.username}#${messageToShow.author.discriminator}`,
iconURL: messageToShow.author.displayAvatarURL(),
})
.setDescription(messageToShow.content)
.setColor(Colors.Aqua);
if (messageToShow.content) {
builder.setDescription(messageToShow.content);
}
if (messageToShow.attachments.size > 0) {
let attachmentsString = "";
messageToShow.attachments.forEach((value) => {