rename helpers.js to functions
This commit is contained in:
parent
b07dd003ed
commit
d194940e2b
5 changed files with 14 additions and 14 deletions
|
@ -21,7 +21,7 @@ module.exports = class {
|
|||
if (!action || action.toLowerCase() === 'list') {
|
||||
const list = [];
|
||||
for (const userID of data.guild.blocklist) {
|
||||
const user = await client.helpers.getUser(userID);
|
||||
const user = await client.functions.getUser(userID);
|
||||
list.push(`${user.username}#${user.discriminator}`);
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ module.exports = class {
|
|||
`${client.constants.emojis.userError} You can't block the owner, silly!`
|
||||
);
|
||||
|
||||
if (client.helpers.highestRole(member).position >= client.helpers.highestRole(message.member).position && message.member.id !== message.channel.guild.ownerID) {
|
||||
if (client.functions.highestRole(member).position >= client.functions.highestRole(message.member).position && message.member.id !== message.channel.guild.ownerID) {
|
||||
return message.channel.createMessage(`${client.constants.emojis.userError} This user has a higher role than you, you can't add them to the blocklist!`);
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ module.exports = class {
|
|||
}
|
||||
|
||||
if (action === 'remove') {
|
||||
if (client.helpers.highestRole(member).position >= client.helpers.highestRole(message.member).position && message.member.id !== message.channel.guild.ownerID) {
|
||||
if (client.functions.highestRole(member).position >= client.functions.highestRole(message.member).position && message.member.id !== message.channel.guild.ownerID) {
|
||||
return message.channel.createMessage(`${client.constants.emojis.userError} This user has a higher role than you, you can't remove them to the blocklist!`);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,14 +19,14 @@ module.exports = class {
|
|||
const code = args.join(' ');
|
||||
try {
|
||||
const evaled = eval(code);
|
||||
const clean = await client.helpers.clean(evaled);
|
||||
const clean = await client.functions.clean(evaled);
|
||||
const MAX_CHARS = 3 + 2 + clean.length + 3;
|
||||
if (MAX_CHARS > 2000) {
|
||||
return message.channel.createMessage(undefined, { file: Buffer.from(clean), name: 'EVAL_SUCCESS.txt' });
|
||||
return message.channel.createMessage(undefined, { file: Buffer.from(clean), name: 'EVAL_SUCCESS.js' });
|
||||
}
|
||||
message.channel.createMessage(`\`\`\`js\n${clean}\n\`\`\``);
|
||||
} catch (err) {
|
||||
const e = await client.helpers.clean(err);
|
||||
const e = await client.functions.clean(err);
|
||||
const MAX_CHARS = 3 + 2 + e.length + 3;
|
||||
if (MAX_CHARS > 2000) {
|
||||
return message.channel.createMessage(undefined, { file: Buffer.from(e), name: 'EVAL_ERROR.txt' });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue