From a1216c0ca1f16fa8c2633b0080384ef9c074d526 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Tue, 9 Jul 2019 04:54:56 +0200 Subject: [PATCH] fix send attachment --- event/listeners/message.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/event/listeners/message.js b/event/listeners/message.js index ad8fd36e..6d8d0df3 100644 --- a/event/listeners/message.js +++ b/event/listeners/message.js @@ -158,13 +158,11 @@ class messageListener extends Listener { .setTimestamp(); - if (attach) { - return message.channel.send(embed, {files: [attach]}); - } else { - return message.channel.send(embed); - } + + return message.channel.send(embed, {files: [attach]}); + } - return message.channel.send(text); + return message.channel.send(text), {files: [attach]}; } } }