Add !message/!messageinfo command

This commit is contained in:
Dragory 2020-08-06 00:46:47 +03:00
parent 60aff76ebe
commit e8ff297368
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
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, " ");
}