Closed fisherjacobc closed 2 years ago
if(client.config.logChannelId !== 'false') {
let logEmbed = new Discord.MessageEmbed();
let logChannel = await client.channels.fetch(client.config.logChannelId);
logEmbed.setDescription(`**Moderator:** <@${message.author.id}> (\`${message.author.id}\`)\n**Action:** Shout\n**Message:**\n\`\`\`${msg}\`\`\``);
logEmbed.setColor(client.config.colors.info);
logEmbed.setAuthor(message.author.tag, message.author.displayAvatarURL());
logEmbed.setTimestamp();
return logChannel.send({ embeds: [logEmbed] });
} else {
return;
}
Small bug, easy fix. When the shout command is ran via the slash command. It uses the
message
object instead of theinteraction
object when making the log.