Answer the question
In order to leave comments, you need to log in
How to use guild in a function?
I am new to learning javascript.
How can i use this
msg.guild.iconURL({dynamic:`gif`})in an embed message right here.
const { MessageEmbed } = require('discord.js');
const Color = {
info: '#131313',
warn: 'YELLOW',
error: 'RED',
};
function CreateEmbed(color, message) {
const embed = new MessageEmbed()
.setColor(Color[color])
.setFooter(`BlackSun — Official server`);
if (message) embed.setDescription(message);
return embed;
}
module.exports = { CreateEmbed };
Answer the question
In order to leave comments, you need to log in
Use {format} and not {dynamic}
let emb = new MessageEmbed()
.setDescription('Иконка сервера')
.setImage(message.guild.iconURL({format: 'формат'})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question