Set embed to the average color of the album cover on fm command (#168)

And do not set a color in misc/fm.js when there already is one set.
This commit is contained in:
SileNce5k 2025-09-06 03:32:36 +02:00 committed by GitHub
commit 3ee2a80201
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 53 additions and 11 deletions

View file

@ -87,11 +87,13 @@ module.exports = {
if(sendText.embed != null){
let parse = parseMention(message.author.id, message.guild)
let user = message.guild.members.cache.get(parse);
let roleColor = 15788778;
if (user.roles.color) {
roleColor = user.roles.color.color;
if(!sendText.embed.data.color){
let roleColor = 15788778;
if (user.roles.color) {
roleColor = user.roles.color.color;
}
sendText.embed.setColor(roleColor);
}
sendText.embed.setColor(roleColor);
message.channel.send({embeds :[sendText.embed]})
}else{
message.channel.send(sendText.text.replaceAll("<prefix>", prefix));