3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 00:05:04 +00:00

Add !message/!messageinfo command

This commit is contained in:
Dragory 2020-08-06 00:46:47 +03:00
parent 4b062f6d23
commit a95f7bd96e
9 changed files with 210 additions and 0 deletions

View file

@ -492,6 +492,13 @@ export function trimLines(str: string) {
.trim();
}
export function trimEmptyLines(str: string) {
return str
.split("\n")
.filter(l => l.trim() !== "")
.join("\n");
}
export function asSingleLine(str: string) {
return trimLines(str).replace(/\n/g, " ");
}