mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 02:15:10 +02:00
The Ultimate Formatting is Done
This commit is contained in:
@@ -16,7 +16,7 @@ module.exports = class WarnCommand extends commando.Command {
|
||||
if (message.channel.type !== 'dm') {
|
||||
if (!message.channel.permissionsFor(this.client.user).hasPermission(['SEND_MESSAGES', 'READ_MESSAGES', 'EMBED_LINKS'])) return;
|
||||
}
|
||||
console.log("[Command] " + message.content);
|
||||
console.log(`[Command] ${message.content}`);
|
||||
if (message.channel.type !== 'dm') {
|
||||
let userToWarn = message.mentions.users.first();
|
||||
let reason = message.content.split(" ").slice(2).join(" ");
|
||||
@@ -28,11 +28,11 @@ module.exports = class WarnCommand extends commando.Command {
|
||||
message.channel.send(":ok_hand:");
|
||||
if (message.guild.channels.exists("name", "mod_logs")) {
|
||||
const embed = new Discord.RichEmbed()
|
||||
.setAuthor(message.author.username + '#' + message.author.discriminator, message.author.avatarURL)
|
||||
.setAuthor(`${message.author.username}#${message.author.discriminator}`, message.author.avatarURL)
|
||||
.setColor(0xFFFF00)
|
||||
.setFooter('XiaoBot Moderation', this.client.user.avatarURL)
|
||||
.setTimestamp()
|
||||
.setDescription('**Member:** ' + userToWarn.username + '#' + userToWarn.discriminator + ' (' + userToWarn.id + ')\n**Action:** Warn\n**Reason:** ' + reason);
|
||||
.setDescription(`**Member:** ${userToWarn.username}#${userToWarn.discriminator} (${userToWarn.id})\n**Action:** Warn\n**Reason:** ${reason}`);
|
||||
message.guild.channels.find('name', 'mod_logs').sendEmbed(embed).catch(console.error);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user