mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 10:19:11 +02:00
Don't shorten in animalese
This commit is contained in:
@@ -106,14 +106,7 @@ module.exports = class AnimaleseCommand extends Command {
|
|||||||
return Buffer.from(wav.toBuffer());
|
return Buffer.from(wav.toBuffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
shortenWord(str) {
|
|
||||||
if (str.length > 4) {
|
|
||||||
return `${str.charAt(0)}${str.charAt(1)}${str.charAt(str.length - 2)}${str.charAt(str.length - 1)}`;
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
|
|
||||||
processScript(str) {
|
processScript(str) {
|
||||||
return str.replace(/[^a-z]/gi, ' ').split(' ').map(this.shortenWord).join('');
|
return str.replace(/[^a-z]/gi, ' ').split(' ').join('');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user