Revert .sb functionality
All checks were successful
NodBot Production Dockerization / build (push) Successful in 19s

This commit is contained in:
Skylar Grant 2023-08-06 08:51:28 -04:00
parent e99e6b2e1f
commit 38fdc07e4e

View File

@ -627,6 +627,7 @@ const functions = {
},
spongebob(commandData) {
let newText = '';
let lastIsUpper = 0;
for (const letter of commandData.args) {
if (letter == ' ') {
newText += letter;
@ -634,13 +635,15 @@ const functions = {
}
if (letter == 'i' || letter == 'I') {
newText += 'i';
lastIsUpper = 0;
continue;
}
if (letter == 'l' || letter == 'L') {
newText += 'L';
lastIsUpper = 1;
continue;
}
if (Math.random() > 0.5) {
if (lastIsUpper === 0) {
newText += letter.toUpperCase();
} else {
newText += letter.toLowerCase();