Revert .sb functionality
All checks were successful
NodBot Production Dockerization / build (push) Successful in 19s
All checks were successful
NodBot Production Dockerization / build (push) Successful in 19s
This commit is contained in:
parent
e99e6b2e1f
commit
38fdc07e4e
@ -627,6 +627,7 @@ const functions = {
|
|||||||
},
|
},
|
||||||
spongebob(commandData) {
|
spongebob(commandData) {
|
||||||
let newText = '';
|
let newText = '';
|
||||||
|
let lastIsUpper = 0;
|
||||||
for (const letter of commandData.args) {
|
for (const letter of commandData.args) {
|
||||||
if (letter == ' ') {
|
if (letter == ' ') {
|
||||||
newText += letter;
|
newText += letter;
|
||||||
@ -634,13 +635,15 @@ const functions = {
|
|||||||
}
|
}
|
||||||
if (letter == 'i' || letter == 'I') {
|
if (letter == 'i' || letter == 'I') {
|
||||||
newText += 'i';
|
newText += 'i';
|
||||||
|
lastIsUpper = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (letter == 'l' || letter == 'L') {
|
if (letter == 'l' || letter == 'L') {
|
||||||
newText += 'L';
|
newText += 'L';
|
||||||
|
lastIsUpper = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Math.random() > 0.5) {
|
if (lastIsUpper === 0) {
|
||||||
newText += letter.toUpperCase();
|
newText += letter.toUpperCase();
|
||||||
} else {
|
} else {
|
||||||
newText += letter.toLowerCase();
|
newText += letter.toLowerCase();
|
||||||
|
Loading…
Reference in New Issue
Block a user