fix: message coercion bug affecting vision
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run

This commit is contained in:
KernelDeimos
2025-02-27 14:49:55 -05:00
parent 18170f77e2
commit ec0a721143
@@ -48,7 +48,7 @@ module.exports = class Messages {
if ( whatis(message.content[i]) !== 'object' ) {
throw new Error('each message content item must be a string or object');
}
if ( ! message.content[i].type ) {
if ( typeof message.content[i].text === 'string' && ! message.content[i].type ) {
message.content[i].type = 'text';
}
}