mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Meow
This commit is contained in:
@@ -55,7 +55,7 @@ module.exports = class BanCommand extends Command {
|
||||
await msg.say('Failed to send DM to the user.');
|
||||
}
|
||||
await member.ban({ days: 7, reason });
|
||||
await msg.say(':ok_hand:');
|
||||
msg.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0xFF0000)
|
||||
@@ -67,7 +67,7 @@ module.exports = class BanCommand extends Command {
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.say(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -54,7 +54,7 @@ module.exports = class KickCommand extends Command {
|
||||
await msg.say('Failed to send DM.');
|
||||
}
|
||||
await member.kick({ reason });
|
||||
await msg.say(':ok_hand:');
|
||||
msg.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0xFFA500)
|
||||
@@ -66,7 +66,7 @@ module.exports = class KickCommand extends Command {
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.say(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -40,14 +40,14 @@ module.exports = class LockdownCommand extends Command {
|
||||
Please use \`lockdown stop\` to end the lockdown.
|
||||
`);
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.say(err);
|
||||
}
|
||||
} else if (type === 'stop') {
|
||||
try {
|
||||
await msg.channel.overwritePermissions(msg.guild.defaultRole, { SEND_MESSAGES: true });
|
||||
return msg.say('Lockdown Ended, users without Administrator can now post messages.');
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.say(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ module.exports = class SoftbanCommand extends Command {
|
||||
}
|
||||
await member.ban({ days: 7, reason });
|
||||
await msg.guild.unban(member.user);
|
||||
await msg.say(':ok_hand:');
|
||||
msg.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0xFF4500)
|
||||
@@ -70,7 +70,7 @@ module.exports = class SoftbanCommand extends Command {
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.say(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ module.exports = class UnbanCommand extends Command {
|
||||
const member = bans.get(id);
|
||||
try {
|
||||
await msg.guild.unban(member);
|
||||
await msg.say(':ok_hand:');
|
||||
msg.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0x00AE86)
|
||||
@@ -65,7 +65,7 @@ module.exports = class UnbanCommand extends Command {
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
return msg.say(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+12
-16
@@ -33,7 +33,7 @@ module.exports = class WarnCommand extends Command {
|
||||
return msg.member.hasPermission('KICK_MEMBERS') || msg.member.roles.has(msg.guild.settings.get('staffRole'));
|
||||
}
|
||||
|
||||
async run(msg, args) {
|
||||
run(msg, args) {
|
||||
const modlogs = msg.guild.channels.get(msg.guild.settings.get('modLog'));
|
||||
if (!modlogs) return msg.say('This Command requires a channel set with the `modchannel` command.');
|
||||
if (!modlogs.permissionsFor(this.client.user).has('SEND_MESSAGES'))
|
||||
@@ -41,20 +41,16 @@ module.exports = class WarnCommand extends Command {
|
||||
if (!modlogs.permissionsFor(this.client.user).has('EMBED_LINKS'))
|
||||
return msg.say('This Command requires the `Embed Links` Permission.');
|
||||
const { member, reason } = args;
|
||||
try {
|
||||
await msg.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0xFFFF00)
|
||||
.setTimestamp()
|
||||
.setDescription(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Warn
|
||||
**Reason:** ${reason}
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
} catch (err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
}
|
||||
msg.say(':ok_hand:');
|
||||
const embed = new RichEmbed()
|
||||
.setAuthor(msg.author.tag, msg.author.displayAvatarURL)
|
||||
.setColor(0xFFFF00)
|
||||
.setTimestamp()
|
||||
.setDescription(stripIndents`
|
||||
**Member:** ${member.user.tag} (${member.id})
|
||||
**Action:** Warn
|
||||
**Reason:** ${reason}
|
||||
`);
|
||||
return modlogs.send({ embed });
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user