#UnionValidator Rejection

1 messages · Page 1 of 1 (latest)

sweet quiver
#
!! GOOBISM >> [Crash] Received one or more errors
Origin: unhandledRejection
Error:
    at UnionValidator.handle (\PNFX\Goobism\node_modules\@sapphire\shapeshift\src\validators\UnionValidator.ts:107:30)       
    at UnionValidator.parse (\PNFX\Goobism\node_modules\@sapphire\shapeshift\src\validators\BaseValidator.ts:102:48)
    at EmbedBuilder.setDescription (\PNFX\Goobism\node_modules\@discordjs\builders\src\messages\embed\Embed.ts:63:26)        
    at info (\PNFX\Goobism\src\helpers\Embeds.ts:33:10)
    at Object.moderationHistory (\PNFX\Goobism\src\helpers\Embeds.ts:95:19)
    at \PNFX\Goobism\src\commands\mod.ts:70:35
    at PNFXMenu.editEmbed (\PNFX\Goobism\src\helpers\Menu.ts:150:35)
    at Mod.<anonymous> (\PNFX\Goobism\src\commands\mod.ts:69:18)
    at Generator.next (<anonymous>)
    at \PNFX\Goobism\node_modules\tslib\tslib.js:118:75

I keep getting this error when using my embed helper...

function verificationHistory(verifications: PNFXTypes.GoobismVerification[]): EmbedBuilder {
    let descString = ``;
    if (verifications.length == 0) {
        return info(null, "🔎 This user never verified.")
    }
    for (const verification of verifications) {
        descString += `${verification.User.Tag}\n`
    }

    return info(null, descString)
}```
```ts
function info(title: string | null = null, information: string | null = null, color: ColorResolvable = 0x4fc1f1) {
    console.log(information)
    console.log(typeof information)
    const embed = new EmbedBuilder()
        .setColor(color)
        .setTitle(title)
        .setDescription(information)
    return embed
}
latent plaza
#

The description is invalid

sweet quiver
#

oh wait

#

this code is modified from when it didn't work before

#

one sec

#

there

#

that's how it was

latent plaza
#

Well the description is still invalid

#

What does information log

sweet quiver
#

changed the error

#

It logs as an empty string

#

or new line

latent plaza
#

There's the problem

sweet quiver
#

yeah, just confused on why its empty

#

wait are for loops not asynchronous facepalm