This commit is contained in:
Dragon Fire
2024-03-24 21:12:08 -04:00
parent 942a302ae1
commit 453b432128
+1 -1
View File
@@ -51,7 +51,7 @@ module.exports = class YodaCommand extends Command {
}
newSentences = newSentences.map(sentence => {
const split = sentence.split(' ');
return split.map((word, i) => i === 0 || word === 'i' ? firstUpperCase(word) : word);
return split.map((word, i) => i === 0 || word === 'i' ? firstUpperCase(word) : word).join(' ');
});
return `${newSentences.join('. ').trim()} ${ends[Math.floor(Math.random() * ends.length)]}`;
}