mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 15:58:06 +02:00
23
This commit is contained in:
@@ -57,14 +57,7 @@ module.exports = class BanCommand extends Command {
|
||||
await msg.say(`Successfully banned ${member.user.tag}.`);
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the ban to the mod logs.');
|
||||
} else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Ban
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
} else {
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0xFF0000)
|
||||
@@ -75,6 +68,13 @@ module.exports = class BanCommand extends Command {
|
||||
**Reason:** ${reason}
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} else {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Ban
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -54,14 +54,7 @@ module.exports = class KickCommand extends Command {
|
||||
await msg.say(`Successfully kicked ${member.user.tag}.`);
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the kick to the mod logs.');
|
||||
} else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Kick
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
} else {
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0xFFA500)
|
||||
@@ -72,6 +65,13 @@ module.exports = class KickCommand extends Command {
|
||||
**Reason:** ${reason}
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} else {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Kick
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = class LockdownCommand extends Command {
|
||||
name: 'lockdown',
|
||||
group: 'moderation',
|
||||
memberName: 'lockdown',
|
||||
description: 'Locks down the current channel or removes a lockdown.',
|
||||
description: 'Prevents users from posting in the current channel, or removes a lockdown.',
|
||||
guildOnly: true,
|
||||
clientPermissions: ['ADMINISTRATOR'],
|
||||
userPermissions: ['ADMINISTRATOR'],
|
||||
|
||||
@@ -6,7 +6,7 @@ module.exports = class PruneCommand extends Command {
|
||||
name: 'prune',
|
||||
group: 'moderation',
|
||||
memberName: 'prune',
|
||||
description: 'Deletes messages from the current channel, up to 99.',
|
||||
description: 'Deletes up to 99 messages from the current channel.',
|
||||
guildOnly: true,
|
||||
throttling: {
|
||||
usages: 1,
|
||||
|
||||
@@ -58,14 +58,7 @@ module.exports = class SoftbanCommand extends Command {
|
||||
await msg.say(`Successfully softbanned ${member.user.tag}.`);
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the softban to the mod logs.');
|
||||
} else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Softban
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
} else {
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0xFF4500)
|
||||
@@ -76,6 +69,13 @@ module.exports = class SoftbanCommand extends Command {
|
||||
**Reason:** ${reason}
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} else {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Softban
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48,24 +48,24 @@ module.exports = class UnbanCommand extends Command {
|
||||
await msg.say(`Successfully unbanned ${member.user.tag}.`);
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the unban to the mod logs.');
|
||||
} else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.tag} (${member.id})
|
||||
**Action:** Unban
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
} else {
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0x00AE86)
|
||||
.setTimestamp()
|
||||
.setDescription(stripIndents`
|
||||
**Member:** ${member.tag} (${member.id})
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Unban
|
||||
**Reason:** ${reason}
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} else {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Unban
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -51,14 +51,7 @@ module.exports = class WarnCommand extends Command {
|
||||
await msg.say(`Successfully warned ${member.user.tag}.`);
|
||||
if (!modlogs || !modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES')) {
|
||||
return msg.say('Could not log the warn to the mod logs.');
|
||||
} else if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Warn
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
} else {
|
||||
} else if (modlogs.permissionsFor(this.client.user).has('EMBED_LINKS')) {
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL())
|
||||
.setColor(0xFFFF00)
|
||||
@@ -69,6 +62,13 @@ module.exports = class WarnCommand extends Command {
|
||||
**Reason:** ${reason}
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} else {
|
||||
return modlogs.send(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Warn
|
||||
**Reason:** ${reason}
|
||||
**Moderator:** ${msg.author.tag}
|
||||
`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user