forked from Supositware/Haha-Yes
Fall back color for displayHexColor
Signed-off-by: loicbersier <loic.bersier1@gmail.com>
This commit is contained in:
parent
2fefe31242
commit
80a40cd9dc
3 changed files with 4 additions and 4 deletions
|
@ -67,7 +67,7 @@ class messageListener extends Listener {
|
||||||
censoredMessage = censoredMessage.replace(regex, '█'.repeat(bannedWords[i].get('word').length));
|
censoredMessage = censoredMessage.replace(regex, '█'.repeat(bannedWords[i].get('word').length));
|
||||||
}
|
}
|
||||||
let Embed = this.client.util.embed()
|
let Embed = this.client.util.embed()
|
||||||
.setColor(message.member.displayHexColor)
|
.setColor(message.member ? message.member.displayHexColor : 'NAVY')
|
||||||
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
||||||
.setDescription(censoredMessage);
|
.setDescription(censoredMessage);
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ class MessageReactionAddListener extends Listener {
|
||||||
description = '';
|
description = '';
|
||||||
|
|
||||||
let Embed = client.util.embed()
|
let Embed = client.util.embed()
|
||||||
.setColor(reaction.message.member.displayHexColor)
|
.setColor(reaction.message.member ? reaction.message.member.displayHexColor : 'NAVY')
|
||||||
.setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL())
|
.setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL())
|
||||||
.addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true)
|
.addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true)
|
||||||
.addField('Channel', reaction.message.channel, true)
|
.addField('Channel', reaction.message.channel, true)
|
||||||
|
@ -119,7 +119,7 @@ class MessageReactionAddListener extends Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
let Embed = client.util.embed()
|
let Embed = client.util.embed()
|
||||||
.setColor(reaction.message.member.displayHexColor)
|
.setColor(reaction.message.member ? reaction.message.member.displayHexColor : 'NAVY')
|
||||||
.setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL())
|
.setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL())
|
||||||
.addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true)
|
.addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true)
|
||||||
.addField('Channel', reaction.message.channel, true)
|
.addField('Channel', reaction.message.channel, true)
|
||||||
|
|
|
@ -92,7 +92,7 @@ class messageReactionRemoveListener extends Listener {
|
||||||
description = '';
|
description = '';
|
||||||
|
|
||||||
let Embed = client.util.embed()
|
let Embed = client.util.embed()
|
||||||
.setColor(reaction.message.member.displayHexColor)
|
.setColor(reaction.message.member ? reaction.message.member.displayHexColor : 'NAVY')
|
||||||
.setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL())
|
.setAuthor(reaction.message.author.username, reaction.message.author.displayAvatarURL())
|
||||||
.addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true)
|
.addField('Jump to', `[message](https://discordapp.com/channels/${reaction.message.guild.id}/${reaction.message.channel.id}/${reaction.message.id})`, true)
|
||||||
.addField('Channel', reaction.message.channel, true)
|
.addField('Channel', reaction.message.channel, true)
|
||||||
|
|
Loading…
Reference in a new issue