forked from Supositware/Haha-Yes
remove space on necessary area
This commit is contained in:
parent
ae264aa661
commit
9d0371f865
1 changed files with 3 additions and 0 deletions
|
@ -72,6 +72,7 @@ class messageListener extends Listener {
|
|||
for (let i = 0, l = attach.length; i < l; i++) {
|
||||
if (attach[i].includes('[attach:')) {
|
||||
attach = attach[i].replace('[attach:', '').slice(0, -1);
|
||||
attach = attach.replace(' ', '');
|
||||
i = attach.length;
|
||||
}
|
||||
}
|
||||
|
@ -95,6 +96,7 @@ class messageListener extends Listener {
|
|||
for (let i = 0, l = image.length; i < l; i++) {
|
||||
if (image[i].includes('[embedImage:')) {
|
||||
image = image[i].replace('[embedImage:', '').slice(0, -1);
|
||||
image = image.replace(' ', '');
|
||||
text = text.replace(/(\[embedimage:.*?])/g, '');
|
||||
i = image.length;
|
||||
}
|
||||
|
@ -107,6 +109,7 @@ class messageListener extends Listener {
|
|||
for (let i = 0, l = thumbnail.length; i < l; i++) {
|
||||
if (thumbnail[i].includes('[embedThumbnail:')) {
|
||||
thumbnail = thumbnail[i].replace('[embedThumbnail:', '').slice(0, -1);
|
||||
thumbnail = thumbnail.replace(' ', '');
|
||||
text = text.replace(/(\[embedThumbnail:.*?])/g, '');
|
||||
i = thumbnail.length;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue