Closed configari closed 2 years ago
This happened to me while sending an attachment.
It might be with my dependencies? I'm using Node 16 and yarn 3.2.1.
vouch ❤️
So, just to confirm, this is reproduceable when the user DMs an attachment to the bot?
Nevermind. Can reproduce. Seems I don't account for there being no message content. Will look into this issue shortly.
Can you update to the latest commit (1134d3047dc8d4bf7b99ef3fc53cfe2c88d8d837)? Should be fixed now.
Even if the user has a message content it does not appear in the embed for some reason..
Even if the user has a message content it does not appear in the embed for some reason..
That would be because you haven't enabled the message content intent in the dev portal, most likely.
I have enabled every intent.
Regardless, try things again on the latest commit and let me know if you can still reproduce the original problem.
Okay, thank you.
Still happens for me I did git pull, message content etc intent is enabled though.
CombinedError: Received one or more errors
at UnionValidator.handle (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/UnionValidator.ts:111:21)
at UnionValidator.parse (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:80:86)
at EmbedBuilder.setDescription (/root/mod/ModMail/node_modules/@discordjs/builders/src/messages/embed/Embed.ts:56:52)
at null.sendMemberThreadMessage (/root/mod/ModMail/packages/bot/src/util/sendMemberThreadMessage.ts:40:5)
at default_1.handle (/root/mod/ModMail/packages/bot/src/events/modmail/modmailMessageCreate.ts:114:9)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:384:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21) {
errors: [
ExpectedValidationError: Expected values to be equals
at LiteralValidator.handle (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/LiteralValidator.ts:17:17)
at LiteralValidator.run (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:62:21)
at UnionValidator.handle (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/UnionValidator.ts:106:29)
at UnionValidator.parse (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:80:86)
at EmbedBuilder.setDescription (/root/mod/ModMail/node_modules/@discordjs/builders/src/messages/embed/Embed.ts:56:52)
at null.sendMemberThreadMessage (/root/mod/ModMail/packages/bot/src/util/sendMemberThreadMessage.ts:40:5)
at default_1.handle (/root/mod/ModMail/packages/bot/src/events/modmail/modmailMessageCreate.ts:114:9) {
validator: 's.literal(V)',
given: '',
expected: null
},
ExpectedConstraintError: Invalid string length
at Object.run (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/constraints/StringConstraints.ts:40:18)
at StringValidator.run (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:66:24)
at UnionValidator.handle (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/UnionValidator.ts:106:29)
at UnionValidator.parse (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:80:86)
at EmbedBuilder.setDescription (/root/mod/ModMail/node_modules/@discordjs/builders/src/messages/embed/Embed.ts:56:52)
at null.sendMemberThreadMessage (/root/mod/ModMail/packages/bot/src/util/sendMemberThreadMessage.ts:40:5)
at default_1.handle (/root/mod/ModMail/packages/bot/src/events/modmail/modmailMessageCreate.ts:114:9) {
constraint: 's.string.lengthGreaterThanOrEqual',
given: '',
expected: 'expected.length >= 1'
}
]
}```
Did you actually re-build? yarn build
Oop- I forgot. Sorry, but attachment + message does not work:
CombinedError: Received one or more errors
at EmbedBuilder.setDescription (/root/mod/ModMail/node_modules/@discordjs/builders/src/messages/embed/Embed.ts:56:52)
(Use `node --trace-warnings ...` to show where the warning was created)
at UnionValidator.handle (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/UnionValidator.ts:111:21)
at UnionValidator.parse (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:80:86)
at default_1.handle (/root/mod/ModMail/packages/bot/src/events/modmail/modmailMessageCreate.ts:114:9)
ExpectedValidationError: Expected values to be equals
at LiteralValidator.handle (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/LiteralValidator.ts:17:17)
at LiteralValidator.run (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:62:21)
at EmbedBuilder.setDescription (/root/mod/ModMail/node_modules/@discordjs/builders/src/messages/embed/Embed.ts:56:52)
ExpectedConstraintError: Invalid string length
at Object.run (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/constraints/StringConstraints.ts:40:18)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:177381) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
CombinedError: Received one or more errors
at UnionValidator.handle (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/UnionValidator.ts:111:21)
at UnionValidator.parse (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/BaseValidator.ts:80:86)
at EmbedBuilder.setDescription (/root/mod/ModMail/node_modules/@discordjs/builders/src/messages/embed/Embed.ts:56:52)
at processTicksAndRejections (node:internal/process/task_queues:85:21) {
at UnionValidator.handle (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/validators/UnionValidator.ts:106:29)
ExpectedConstraintError: Invalid string length
at Object.run (/root/mod/ModMail/node_modules/@sapphire/shapeshift/src/constraints/StringConstraints.ts:40:18)
expected: 'expected.length >= 1'
}```
I... can't seem to reproduce?
What did you DM to the bot?
A message + gif (not from gif picker)
Like... did you literally upload a gif file? let me have a look
Nope. Cannot reproduce. What gif file are you using?
Alright, after ubuntu restart it works. Sorry if I made you wait long.