Dosen't send embed when empty message
This commit is contained in:
parent
08a4e86881
commit
11910dad50
1 changed files with 8 additions and 2 deletions
|
@ -25,6 +25,9 @@ class MessageReactionAddListener extends Listener {
|
||||||
let starboardChannel = reload(`../../board/star${reaction.message.guild.id}.json`);
|
let starboardChannel = reload(`../../board/star${reaction.message.guild.id}.json`);
|
||||||
const channel = this.client.channels.get(starboardChannel['starboard']);
|
const channel = this.client.channels.get(starboardChannel['starboard']);
|
||||||
|
|
||||||
|
if (!messageContent)
|
||||||
|
return channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel} ID: ${reaction.message.id} \n${messageAttachments}`);
|
||||||
|
|
||||||
const starEmbed = new MessageEmbed()
|
const starEmbed = new MessageEmbed()
|
||||||
.setColor(reaction.message.member.displayHexColor)
|
.setColor(reaction.message.member.displayHexColor)
|
||||||
.setDescription(messageContent)
|
.setDescription(messageContent)
|
||||||
|
@ -32,7 +35,7 @@ class MessageReactionAddListener extends Listener {
|
||||||
.setTimestamp();
|
.setTimestamp();
|
||||||
|
|
||||||
channel.send({ embed: starEmbed});
|
channel.send({ embed: starEmbed});
|
||||||
return channel.send(`From: ${reaction.message.channel} ID: ${reaction.message.id} \n${messageAttachments}`);
|
return channel.send(`in: ${reaction.message.channel} ID: ${reaction.message.id} \n${messageAttachments}`);
|
||||||
}
|
}
|
||||||
//Shameboard
|
//Shameboard
|
||||||
if (reaction.emoji.name === '✡' && reaction.count === 4) {
|
if (reaction.emoji.name === '✡' && reaction.count === 4) {
|
||||||
|
@ -44,6 +47,9 @@ class MessageReactionAddListener extends Listener {
|
||||||
let shameboardChannel = reload(`../../board/shame${reaction.message.guild.id}.json`);
|
let shameboardChannel = reload(`../../board/shame${reaction.message.guild.id}.json`);
|
||||||
const channel = this.client.channels.get(shameboardChannel['shameboard']);
|
const channel = this.client.channels.get(shameboardChannel['shameboard']);
|
||||||
|
|
||||||
|
if (!messageContent)
|
||||||
|
return channel.send(`${reaction.message.author.username}, in: ${reaction.message.channel} ID: ${reaction.message.id} \n${messageAttachments}`);
|
||||||
|
|
||||||
const shameEmbed = new MessageEmbed()
|
const shameEmbed = new MessageEmbed()
|
||||||
.setColor(reaction.message.member.displayHexColor)
|
.setColor(reaction.message.member.displayHexColor)
|
||||||
.setDescription(messageContent)
|
.setDescription(messageContent)
|
||||||
|
@ -51,7 +57,7 @@ class MessageReactionAddListener extends Listener {
|
||||||
.setTimestamp();
|
.setTimestamp();
|
||||||
|
|
||||||
channel.send({ embed: shameEmbed});
|
channel.send({ embed: shameEmbed});
|
||||||
return channel.send(`From: ${reaction.message.channel} ID: ${reaction.message.id} \n${messageAttachments}`);
|
return channel.send(`in: ${reaction.message.channel} ID: ${reaction.message.id} \n${messageAttachments}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue