delete message only if it can send message

This commit is contained in:
loicbersier 2020-03-05 22:42:16 +01:00
parent 68dcc1875c
commit b60057e110

View file

@ -270,8 +270,10 @@ class messageListener extends Listener {
let Attachment = (quote.attachments).array();
if (Attachment[0]) Embed.setImage(Attachment[0].url);
return message.channel.send(Embed)
.then(() => {
message.delete();
return message.channel.send(Embed);
});
}
}