Created the command type `per-guild` these commands are registered when the bot enters a new guild, different of the global type, they can have permissions edited (the permissions system need to be developed yet). `guild` commands will be registered just in the development guild (probably the purpose of them need to be rethought). The reload command became adapted to be compatible with the command type system. When a command is reloaded, it's on all other guilds.
51 lines
1.3 KiB
JavaScript
51 lines
1.3 KiB
JavaScript
const chalk = require('chalk');
|
|
|
|
module.exports = {
|
|
|
|
CONSOLE: require('console'),
|
|
|
|
log: (...args) => console.log(...args),
|
|
|
|
time: (label) => console.time(chalk.hex('#DF82FF').bold(`\n[ TIME LOG ] ${label}`)),
|
|
timeEnd: (label) => console.timeEnd(chalk.hex('#DF82FF').bold(`\n[ TIME LOG ] ${label}`)),
|
|
timeLog: (label) => console.timeLog(chalk.hex('#DF82FF').bold(`\n[ TIME LOG ] ${label}`)),
|
|
|
|
assert: (args) => console.assert(args),
|
|
|
|
table: (obj) => console.table(obj),
|
|
|
|
count: (n) => console.count(n),
|
|
|
|
clear: () => console.clear(),
|
|
|
|
error: (errorMsg) => {
|
|
console.log(
|
|
// chalk.bgHex('#D02525').hex('#ffffff').bold('\n ERROR ') +
|
|
chalk.hex('#D02525').bold(`\n[ ERROR ] ${errorMsg}`));
|
|
console.error(errorMsg);
|
|
},
|
|
|
|
warn: (warnMsg) => {
|
|
console.log(
|
|
// chalk.bgHex('#E5C10E').hex('#ffffff').bold('\n WARNING ') +
|
|
chalk.hex('#E5C10E').bold(`\n[ WARNING ] ${warnMsg}`));
|
|
},
|
|
|
|
system: (systemMsg) => {
|
|
console.log(
|
|
// chalk.bgHex('#0EB4E5').hex('#ffffff').bold('\n SYSTEM ') +
|
|
chalk.hex('#0EB4E5').bold(`\n[ SYSTEM ] ${systemMsg}`));
|
|
},
|
|
|
|
info: (infoMsg) => {
|
|
console.log(
|
|
// chalk.bgHex('#52C74F').hex('#ffffff').bold('\n INFO ') +
|
|
chalk.hex('#52C74F').bold(`\n[ INFO ] ${infoMsg}`));
|
|
},
|
|
|
|
debug: (debugMsg) => {
|
|
console.log(
|
|
chalk.bgHex('#252525').hex('#ffffff').bold('\n [ DEBUG ] ') + chalk.reset(` ${debugMsg}`));
|
|
},
|
|
|
|
}; |