From 6ea766ed1d5c4e993cf9fbf902ccaf3ba226f9f0 Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Wed, 22 Apr 2020 22:57:22 +1000 Subject: [PATCH] reordered functions --- utils/_functions.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/utils/_functions.js b/utils/_functions.js index be9d121..4d01421 100644 --- a/utils/_functions.js +++ b/utils/_functions.js @@ -152,25 +152,6 @@ module.exports = client => { return role } - // Loads commands - client.loadCommand = (commandName) => { - try { - const props = require(`../commands/${commandName}`) - if (props.init) { - props.init(client) - } - client.commands.set(props.help.name, props) - // So commands can each have their own cooldown time - client.cooldown.set(props.help.name, new Map()) - props.conf.aliases.forEach(alias => { - client.aliases.set(alias, props.help.name) - }) - return false - } catch (e) { - return `Failed to load ${commandName}: ${e}` - } - } - // Permission level function client.permlevel = (message, settings) => { let permlvl = 0 @@ -256,6 +237,25 @@ module.exports = client => { } } + // Loads commands + client.loadCommand = (commandName) => { + try { + const props = require(`../commands/${commandName}`) + if (props.init) { + props.init(client) + } + client.commands.set(props.help.name, props) + // So commands can each have their own cooldown time + client.cooldown.set(props.help.name, new Map()) + props.conf.aliases.forEach(alias => { + client.aliases.set(alias, props.help.name) + }) + return false + } catch (e) { + return `Failed to load ${commandName}: ${e}` + } + } + // Command unloader client.unloadCommand = async (commandName) => { let command