forked from Supositware/Haha-Yes
fixed missing :
This commit is contained in:
parent
df40fa0f58
commit
bd3461fddd
1 changed files with 15 additions and 15 deletions
|
@ -63,7 +63,7 @@ class messageListener extends Listener {
|
||||||
|
|
||||||
let attach = '';
|
let attach = '';
|
||||||
|
|
||||||
if (text.includes('[attach')) {
|
if (text.includes('[attach:')) {
|
||||||
attach = text.split(/(\[attach:.*?])/);
|
attach = text.split(/(\[attach:.*?])/);
|
||||||
for (let i = 0, l = attach.length; i < l; i++) {
|
for (let i = 0, l = attach.length; i < l; i++) {
|
||||||
if (attach[i].includes('[attach:')) {
|
if (attach[i].includes('[attach:')) {
|
||||||
|
@ -71,7 +71,7 @@ class messageListener extends Listener {
|
||||||
i = attach.length;
|
i = attach.length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text = text.replace(/(\[attach:.*?])/, '')
|
text = text.replace(/(\[attach:.*?])/, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// THIS SECTION IS VERY VERY BAD MUST CHANGE
|
// THIS SECTION IS VERY VERY BAD MUST CHANGE
|
||||||
|
@ -163,20 +163,20 @@ class messageListener extends Listener {
|
||||||
.setTimestamp();
|
.setTimestamp();
|
||||||
|
|
||||||
|
|
||||||
if (attach) {
|
if (attach) {
|
||||||
return message.channel.send(embed, {files: [attach]});
|
return message.channel.send(embed, {files: [attach]});
|
||||||
} else {
|
} else {
|
||||||
return message.channel.send(embed);
|
return message.channel.send(embed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attach) {
|
if (attach) {
|
||||||
return message.channel.send(text, {files: [attach]});
|
return message.channel.send(text, {files: [attach]});
|
||||||
} else {
|
} else {
|
||||||
return message.channel.send(text);
|
return message.channel.send(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
null;
|
null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue