update imports

This commit is contained in:
Emily 2020-10-08 13:05:14 +11:00
parent cfd675d29b
commit f005efc454
3 changed files with 4 additions and 5 deletions

View file

@ -16,14 +16,14 @@ class Eval extends Command {
const code = args.join(" ");
try {
const evaled = eval(code);
const clean = await this.client.util.clean(evaled);
const clean = await this.client.functions.clean(evaled);
const MAX_CHARS = 3 + 2 + clean.length + 3;
if (MAX_CHARS > 2000) {
message.channel.send({ files: [new Discord.MessageAttachment(Buffer.from(clean), "output.txt")] });
}
message.channel.send(`\`\`\`js\n${clean}\n\`\`\``);
} catch (err) {
const e = await this.client.util.clean(err);
const e = await this.client.functions.clean(err);
const MAX_CHARS = 1 + 5 + 1 + 3 + e.length + 3;
console.log(MAX_CHARS);
if (MAX_CHARS > 2000) {

View file

@ -23,7 +23,7 @@ module.exports = class {
const cmd = this.client.commands.get(command) || this.client.commands.get(this.client.aliases.get(command));
if (!cmd) return;
if (cmd && cmd.conf.devOnly && this.client.util.isDeveloper(message.author.id) !== true) {
if (cmd && cmd.conf.devOnly && this.client.functions.isDeveloper(message.author.id) !== true) {
return message.channel.send("devs only!");
}
if (cmd && !message.guild && cmd.conf.guildOnly) {

View file

@ -23,8 +23,7 @@ class Custom extends Client {
this.path = __dirname;
this.package = require("../package.json")
this.logger = require("./util/logger");
this.util = new (require("./util/util"))(this);
this.messageUtil = new (require("./util/messageUtil"))(this);
this.functions = new (require("./util/functions"))(this);
this.db = new (require("./util/redis"))(this);
// Create collections to store loaded commands and aliases in