mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Small changes, reply to some things
This commit is contained in:
@@ -33,11 +33,11 @@ module.exports = class BanCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg, { member, reason }) {
|
||||
if (member.id === msg.author.id) return msg.say('I don\'t think you want to ban yourself...');
|
||||
if (member.id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?');
|
||||
if (!member.bannable) return msg.say('This member is not bannable. Perhaps they have a higher role than me?');
|
||||
if (member.id === msg.author.id) return msg.reply('I don\'t think you want to ban yourself...');
|
||||
if (member.id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?');
|
||||
if (!member.bannable) return msg.reply('This member is not bannable. Perhaps they have a higher role than me?');
|
||||
if (member.highestRole.position > msg.member.highestRole.position - 1) {
|
||||
return msg.say('Your roles are too low to ban this member.');
|
||||
return msg.reply('Your roles are too low to ban this member.');
|
||||
}
|
||||
await msg.say(`Are you sure you want to ban ${member.user.tag} (${member.id})?`);
|
||||
const verification = await verify(msg.channel, msg.author);
|
||||
@@ -56,7 +56,7 @@ module.exports = class BanCommand extends Command {
|
||||
reason: `${msg.author.tag}: ${reason}`
|
||||
});
|
||||
} catch (err) {
|
||||
return msg.say(`Failed to ban ${member.user.tag}: \`${err.message}\`.`);
|
||||
return msg.reply(`Failed to ban ${member.user.tag}: \`${err.message}\`.`);
|
||||
}
|
||||
return msg.say(`Successfully banned ${member.user.tag}.`);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ module.exports = class ClearChannelCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg) {
|
||||
if (!msg.channel.deletable) return msg.say('This channel cannot be deleted.');
|
||||
if (!msg.channel.deletable) return msg.reply('This channel cannot be deleted.');
|
||||
const channel = await msg.channel.clone();
|
||||
if (msg.channel.parent) await channel.setParent(msg.channel.parent);
|
||||
await msg.channel.delete();
|
||||
|
||||
@@ -32,13 +32,13 @@ module.exports = class HackbanCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg, { id, reason }) {
|
||||
if (id === msg.author.id) return msg.say('I don\'t think you want to ban yourself...');
|
||||
if (id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?');
|
||||
if (id === msg.author.id) return msg.reply('I don\'t think you want to ban yourself...');
|
||||
if (id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?');
|
||||
let user;
|
||||
try {
|
||||
user = await this.client.users.fetch(id);
|
||||
} catch (err) {
|
||||
return msg.say('Could not resolve user.');
|
||||
return msg.reply('Could not resolve user.');
|
||||
}
|
||||
await msg.say(`Are you sure you want to hackban ${user.tag} (${user.id})?`);
|
||||
const verification = await verify(msg.channel, msg.author);
|
||||
@@ -49,7 +49,7 @@ module.exports = class HackbanCommand extends Command {
|
||||
reason: `${msg.author.tag}: ${reason}`
|
||||
});
|
||||
} catch (err) {
|
||||
return msg.say(`Failed to hackban ${user.tag}: \`${err.message}\`.`);
|
||||
return msg.reply(`Failed to hackban ${user.tag}: \`${err.message}\`.`);
|
||||
}
|
||||
return msg.say(`Successfully hackbanned ${user.tag}.`);
|
||||
}
|
||||
|
||||
@@ -33,11 +33,11 @@ module.exports = class KickCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg, { member, reason }) {
|
||||
if (member.id === msg.author.id) return msg.say('I don\'t think you want to kick yourself...');
|
||||
if (member.id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?');
|
||||
if (!member.kickable) return msg.say('This member is not kickable. Perhaps they have a higher role than me?');
|
||||
if (member.id === msg.author.id) return msg.reply('I don\'t think you want to kick yourself...');
|
||||
if (member.id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?');
|
||||
if (!member.kickable) return msg.reply('This member is not kickable. Perhaps they have a higher role than me?');
|
||||
if (member.highestRole.position > msg.member.highestRole.position - 1) {
|
||||
return msg.say('Your roles are too low to kick this member.');
|
||||
return msg.reply('Your roles are too low to kick this member.');
|
||||
}
|
||||
await msg.say(`Are you sure you want to kick ${member.user.tag} (${member.id})?`);
|
||||
const verification = await verify(msg.channel, msg.author);
|
||||
@@ -53,7 +53,7 @@ module.exports = class KickCommand extends Command {
|
||||
try {
|
||||
await member.kick(`${msg.author.tag}: ${reason}`);
|
||||
} catch (err) {
|
||||
return msg.say(`Failed to kick ${member.user.tag}: \`${err.message}\`.`);
|
||||
return msg.reply(`Failed to kick ${member.user.tag}: \`${err.message}\`.`);
|
||||
}
|
||||
return msg.say(`Successfully kicked ${member.user.tag}.`);
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@ module.exports = class PruneCommand extends Command {
|
||||
try {
|
||||
const messages = await msg.channel.messages.fetch({ limit: count + 1 });
|
||||
const msgs = await msg.channel.bulkDelete(messages, true);
|
||||
if (!msgs.size) return msg.say('There are no messages younger than two weeks that can be deleted.');
|
||||
if (!msgs.size) return msg.reply('There are no messages younger than two weeks that can be deleted.');
|
||||
return null;
|
||||
} catch (err) {
|
||||
return msg.say('There are no messages younger than two weeks that can be deleted.');
|
||||
return msg.reply('There are no messages younger than two weeks that can be deleted.');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -33,11 +33,11 @@ module.exports = class SoftbanCommand extends Command {
|
||||
}
|
||||
|
||||
async run(msg, { member, reason }) {
|
||||
if (member.id === msg.author.id) return msg.say('I don\'t think you want to softban yourself...');
|
||||
if (member.id === msg.guild.ownerID) return msg.say('Don\'t you think that might be betraying your leader?');
|
||||
if (!member.bannable) return msg.say('This member is not softbannable. Perhaps they have a higher role than me?');
|
||||
if (member.id === msg.author.id) return msg.reply('I don\'t think you want to softban yourself...');
|
||||
if (member.id === msg.guild.ownerID) return msg.reply('Don\'t you think that might be betraying your leader?');
|
||||
if (!member.bannable) return msg.reply('This member is not softbannable. Perhaps they have a higher role than me?');
|
||||
if (member.highestRole.position > msg.member.highestRole.position - 1) {
|
||||
return msg.say('Your roles are too low to softban this member.');
|
||||
return msg.reply('Your roles are too low to softban this member.');
|
||||
}
|
||||
await msg.say(`Are you sure you want to softban ${member.user.tag} (${member.id})?`);
|
||||
const verification = await verify(msg.channel, msg.author);
|
||||
@@ -57,7 +57,7 @@ module.exports = class SoftbanCommand extends Command {
|
||||
});
|
||||
await msg.guild.unban(member.user, 'Softban');
|
||||
} catch (err) {
|
||||
return msg.say(`Failed to softban ${member.user.tag}: \`${err.message}\`.`);
|
||||
return msg.reply(`Failed to softban ${member.user.tag}: \`${err.message}\`.`);
|
||||
}
|
||||
return msg.say(`Successfully softbanned ${member.user.tag}.`);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ module.exports = class UnbanCommand extends Command {
|
||||
|
||||
async run(msg, { id, reason }) {
|
||||
const bans = await msg.guild.fetchBans();
|
||||
if (!bans.has(id)) return msg.say('This ID is not in the server banlist.');
|
||||
if (!bans.has(id)) return msg.reply('This ID is not in the server banlist.');
|
||||
const member = bans.get(id).user;
|
||||
await msg.say(`Are you sure you want to unban ${member.tag} (${member.id})?`);
|
||||
const verification = await verify(msg.channel, msg.author);
|
||||
@@ -41,7 +41,7 @@ module.exports = class UnbanCommand extends Command {
|
||||
try {
|
||||
await msg.guild.unban(member, `${msg.author.tag}: ${reason}`);
|
||||
} catch (err) {
|
||||
return msg.say(`Failed to unban ${member.tag}: \`${err.message}\`.`);
|
||||
return msg.reply(`Failed to unban ${member.tag}: \`${err.message}\`.`);
|
||||
}
|
||||
return msg.say(`Successfully unbanned ${member.tag}.`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user