update imports
This commit is contained in:
parent
cfd675d29b
commit
f005efc454
3 changed files with 4 additions and 5 deletions
|
@ -16,14 +16,14 @@ class Eval extends Command {
|
||||||
const code = args.join(" ");
|
const code = args.join(" ");
|
||||||
try {
|
try {
|
||||||
const evaled = eval(code);
|
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;
|
const MAX_CHARS = 3 + 2 + clean.length + 3;
|
||||||
if (MAX_CHARS > 2000) {
|
if (MAX_CHARS > 2000) {
|
||||||
message.channel.send({ files: [new Discord.MessageAttachment(Buffer.from(clean), "output.txt")] });
|
message.channel.send({ files: [new Discord.MessageAttachment(Buffer.from(clean), "output.txt")] });
|
||||||
}
|
}
|
||||||
message.channel.send(`\`\`\`js\n${clean}\n\`\`\``);
|
message.channel.send(`\`\`\`js\n${clean}\n\`\`\``);
|
||||||
} catch (err) {
|
} 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;
|
const MAX_CHARS = 1 + 5 + 1 + 3 + e.length + 3;
|
||||||
console.log(MAX_CHARS);
|
console.log(MAX_CHARS);
|
||||||
if (MAX_CHARS > 2000) {
|
if (MAX_CHARS > 2000) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ module.exports = class {
|
||||||
const cmd = this.client.commands.get(command) || this.client.commands.get(this.client.aliases.get(command));
|
const cmd = this.client.commands.get(command) || this.client.commands.get(this.client.aliases.get(command));
|
||||||
if (!cmd) return;
|
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!");
|
return message.channel.send("devs only!");
|
||||||
}
|
}
|
||||||
if (cmd && !message.guild && cmd.conf.guildOnly) {
|
if (cmd && !message.guild && cmd.conf.guildOnly) {
|
||||||
|
|
|
@ -23,8 +23,7 @@ class Custom extends Client {
|
||||||
this.path = __dirname;
|
this.path = __dirname;
|
||||||
this.package = require("../package.json")
|
this.package = require("../package.json")
|
||||||
this.logger = require("./util/logger");
|
this.logger = require("./util/logger");
|
||||||
this.util = new (require("./util/util"))(this);
|
this.functions = new (require("./util/functions"))(this);
|
||||||
this.messageUtil = new (require("./util/messageUtil"))(this);
|
|
||||||
this.db = new (require("./util/redis"))(this);
|
this.db = new (require("./util/redis"))(this);
|
||||||
|
|
||||||
// Create collections to store loaded commands and aliases in
|
// Create collections to store loaded commands and aliases in
|
||||||
|
|
Loading…
Reference in a new issue