Hopefully fix undefined

This commit is contained in:
loicbersier 2020-02-05 16:48:21 +01:00
parent 903f9cd59e
commit f65b91e1f2
2 changed files with 3 additions and 3 deletions

View file

@ -85,7 +85,7 @@ class MessageReactionAddListener extends Listener {
// If the original embed description is empty make this embed empty ( and not undefined )
let description = message.embeds[0].description;
if (!message.embeds[0].description)
if (!message.embeds[0].description || message.embeds[0].description == undefined)
description = '';
let Embed = client.util.embed()

View file

@ -80,13 +80,13 @@ class messageReactionRemoveListener extends Listener {
}
let message = await channel.messages.get(boardID);
console.log(message);
// If the message doesn't have embeds assume it got deleted so don't do anything
if (!message) return;
// If the original embed description is empty make this embed empty ( and not undefined )
let description = message.embeds[0].description;
if (!message.embeds[0].description)
if (!message.embeds[0].description || message.embeds[0].description == undefined)
description = '';
let Embed = client.util.embed()