mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 06:37:32 +02:00
Cut less of the string off
This commit is contained in:
@@ -107,8 +107,8 @@ module.exports = class AnimaleseCommand extends Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shortenWord(str) {
|
shortenWord(str) {
|
||||||
if (str.length > 1) {
|
if (str.length > 4) {
|
||||||
return str[0] + str[str.length - 1];
|
return `${str.charAt(0)}${str.charAt(1)}${str.charAt(str.length - 2)}${str.charAt(str.length - 1)}`;
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user