Renamed blacklist to blocklist

This commit is contained in:
Emily 2020-08-16 18:19:28 +10:00
parent 61e6951833
commit 4bbdac7070
3 changed files with 15 additions and 15 deletions

View file

@ -7,7 +7,7 @@ exports.run = async (client, message, [action, ...member]) => {
if(!action) {
return message.channel.send(
`<:error:466995152976871434> You didn't tell me if I was meant to add or remove someone from the blacklist! Usage: \`${client.commands.get(`blacklist`).help.usage}\``
`<:error:466995152976871434> You didn't tell me if I was meant to add or remove someone from the blocklist! Usage: \`${client.commands.get(`blocklist`).help.usage}\``
)
}
@ -15,7 +15,7 @@ exports.run = async (client, message, [action, ...member]) => {
if(!member) {
return message.channel.send(
`<:error:466995152976871434> You didn't tell me who to blacklist! Usage: \`${client.commands.get(`blacklist`).help.usage}\``
`<:error:466995152976871434> You didn't tell me who to add to the blocklist! Usage: \`${client.commands.get(`blocklist`).help.usage}\``
);
};
@ -41,18 +41,18 @@ exports.run = async (client, message, [action, ...member]) => {
};
if (user.id === message.guild.owner.id) {
return message.channel.send("<:error:466995152976871434> You can't blacklist the owner!")
return message.channel.send("<:error:466995152976871434> You can't add the owner to the blocklist!")
};
let admin = message.guild.member(message.author)
if (user.roles.highest.position >= admin.roles.highest.position && admin.user.id !== message.guild.ownerID) {
return message.channel.send(
`<:error:466995152976871434> You can't blacklist people higher ranked than yourself!`
`<:error:466995152976871434> You can't add people higher ranked than yourself to the blocklist!`
);
};
if(user.id === message.member.id) {
return message.channel.send('<:error:466995152976871434> You can\'t blacklist yourself!');
return message.channel.send('<:error:466995152976871434> You can\'t add yourself to the blocklist!');
};
let blacklisted = false;
@ -65,13 +65,13 @@ exports.run = async (client, message, [action, ...member]) => {
});
if(blacklisted == true) {
return message.channel.send('<:error:466995152976871434> This person has already been blacklisted!');
return message.channel.send('<:error:466995152976871434> This person is already on the blocklist!');
};
};
client.settings.push(message.guild.id, user.id, "blacklisted")
return message.channel.send(`<:success:466995111885144095> Blacklisted \`${user.user.tag}\``)
return message.channel.send(`<:success:466995111885144095> Added \`${user.user.tag}\` to the blocklist.`)
};
@ -99,26 +99,26 @@ exports.run = async (client, message, [action, ...member]) => {
});
if(blacklisted != true) {
return message.channel.send('<:error:466995152976871434> This user isn\'t blacklisted!');
return message.channel.send('<:error:466995152976871434> This user isn\'t on the blocklist!');
};
client.settings.remove(message.guild.id, user.id, "blacklisted")
return message.channel.send(`<:success:466995111885144095> Removed \`${user.user.tag}\` from the blacklist.`)
return message.channel.send(`<:success:466995111885144095> Removed \`${user.user.tag}\` from the blocklist.`)
};
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: [],
aliases: ['bl'],
permLevel: "Administrator",
requiredPerms: []
};
exports.help = {
name: "blacklist",
name: "blocklist",
category: "Moderation",
description: "Allows you to configure Woomy's blacklist. Blacklisted users cannot use commands.",
usage: "blacklist [add/remove] [member]"
description: "Allows you to configure Woomy's blocklist. Users on the blocklist cannot use commands.",
usage: "blocklist [add/remove] [member]"
};

View file

@ -80,7 +80,7 @@ exports.run = async (client, message, args) => {
embed.setAuthor("Settings for: " + message.guild.name, message.guild.iconURL({dynamic: true}))
embed.setColor(message.guild.member(client.user).displayHexColor)
embed.setDescription("You can edit these settings using the commands in the 'configure' section of the help command.")
embed.addFields({ name: "General:", value: `Prefix: \`${prefix}\`\nChat logging: ${chatChan}\nMod logging: ${modChan}\nRaid mode: ${raidMode}\nJoin/leave channel: ${greetChan}\nWelcome message: ${welcomeMessage}\nLeave message: ${leaveMessage}`, inline: true}, {name: "Roles:", value: `Moderator: ${modRole}\nAdministrator: ${adminRole}\nMuted: ${mutedRole}\nBlacklisted: ${blacklist}\nAutorole: ${autorole}`, inline: true})
embed.addFields({ name: "General:", value: `Prefix: \`${prefix}\`\nChat logging: ${chatChan}\nMod logging: ${modChan}\nRaid mode: ${raidMode}\nJoin/leave channel: ${greetChan}\nWelcome message: ${welcomeMessage}\nLeave message: ${leaveMessage}`, inline: true}, {name: "Roles:", value: `Moderator: ${modRole}\nAdministrator: ${adminRole}\nMuted: ${mutedRole}\nBlocklist: ${blacklist}\nAutorole: ${autorole}`, inline: true})
message.channel.send(embed)
};

View file

@ -171,7 +171,7 @@ module.exports = async (client, message) => {
if(message.guild && blacklisted == true) {
try {
return message.author.send(
`<:denied:466995195150336020> You have been blacklisted from using commands in \`${message.guild.name}\``
`<:denied:466995195150336020> You have been blocked from using commands in \`${message.guild.name}\``
);
} catch(err) {
client.logger.log(err, "error")