make async

This commit is contained in:
loicbersier 2019-12-06 18:48:51 +01:00
parent 2d8c062dce
commit 2339a79877

View file

@ -50,7 +50,7 @@ class MessageReactionAddListener extends Listener {
} }
} }
function sendEmbed(name, emote, client) { async function sendEmbed(name, emote, client) {
let channel; let channel;
if (name == 'starboard') { if (name == 'starboard') {
channel = client.channels.get(starboardChannel['starboard']); channel = client.channels.get(starboardChannel['starboard']);
@ -78,7 +78,7 @@ class MessageReactionAddListener extends Listener {
} else { } else {
Embed.setDescription(messageContent); Embed.setDescription(messageContent);
return channel.send({files: messageAttachments, embed: Embed}) return channel.send({files: messageAttachments, embed: Embed})
.catch(() => channel.send(messageAttachments, { embed: Embed})); .catch(async () => channel.send(messageAttachments, { embed: Embed}));
} }
} }
} }