Skip to content

Commit

Permalink
Removed colors package
Browse files Browse the repository at this point in the history
  • Loading branch information
devdeem committed Jan 6, 2024
1 parent f7747bf commit d66b6ca
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 149 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
github: devdeem
ko-fi: deemdev
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ Logger.success('...');
- `cyan`
- `white`
- `gray`
- `grey`
- `brightRed`
- `brightGreen`
- `brightYellow`
Expand Down Expand Up @@ -132,14 +131,13 @@ BgColors.bgRed('...');
<br />

- `bold`
- `dim`
- `italic`
- `underline`
- `inverse`
- `hidden`
- `strikethrough`
- `rainbow`
- `america`
- `trap`
- `random`
- `visible`
</details>

<br />
Expand All @@ -159,6 +157,7 @@ TextStyles.underline('...');
- [Nero Bot](https://nerobot.eu)
- [Note Bot](https://github.com/lassejlv/note-bot)
- [Movie Swiper](https://www.movieswiper.xyz/)
- [Cosmo](https://cosmobot.app)

Do you use a term-logger? Join our [Discord Server](https://discord.com/invite/UdKSrxBXyd) and let us know!

Expand Down
18 changes: 9 additions & 9 deletions logger/BgColors.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
// COLORS PACKAGE
const c = require('colors');
const chalk = require('chalk');

const bgRed = (data) => {
return console.log(`${`${data}`.bgRed}`);
return console.log(chalk.bgRed(data));
};

const bgGreen = (data) => {
return console.log(`${`${data}`.bgGreen}`);
return console.log(chalk.bgGreen(data));
};

const bgYellow = (data) => {
return console.log(`${`${data}`.bgYellow}`);
return console.log(chalk.bgYellow(data));
};

const bgBlue = (data) => {
return console.log(`${`${data}`.bgBlue}`);
return console.log(chalk.bgBlue(data));
};

const bgPurple = (data) => {
return console.log(`${`${data}`.bgMagenta}`);
return console.log(chalk.bgMagenta(data));
};

const bgCyan = (data) => {
return console.log(`${`${data}`.bgCyan}`);
return console.log(chalk.bgCyan(data));
};

const bgWhite = (data) => {
return console.log(`${`${data}`.bgWhite}`);
return console.log(chalk.bgWhite(data));
};

const bgGrey = (data) => {
return console.log(`${`${data}`.bgGrey}`);
return console.log(chalk.bgGrey(data));
};

module.exports = {
Expand Down
16 changes: 8 additions & 8 deletions logger/BrightColors.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
// COLORS PACKAGE
const c = require('colors');
const chalk = require('chalk');

const brightRed = (data) => {
return console.log(`${`${data}`.brightRed}`);
return console.log(chalk.redBright(data));
};

const brightGreen = (data) => {
return console.log(`${`${data}`.brightGreen}`);
return console.log(chalk.greenBright(data));
};

const brightYellow = (data) => {
return console.log(`${`${data}`.brightYellow}`);
return console.log(chalk.yellowBright(data));
};

const brightBlue = (data) => {
return console.log(`${`${data}`.brightBlue}`);
return console.log(chalk.blueBright(data));
};

const brightPurple = (data) => {
return console.log(`${`${data}`.brightMagenta}`);
return console.log(chalk.magentaBright(data));
};

const brightCyan = (data) => {
return console.log(`${`${data}`.brightCyan}`);
return console.log(chalk.cyanBright(data));
};

const brightWhite = (data) => {
return console.log(`${`${data}`.brightWhite}`);
return console.log(chalk.whiteBright(data));
};

module.exports = {
Expand Down
116 changes: 58 additions & 58 deletions logger/Logger.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// COLORS PACKAGE
const c = require('colors');
const chalk = require('chalk');

const date = new Date();
const hours = date.getHours();
Expand All @@ -8,191 +8,191 @@ const seconds = date.getSeconds();

const error = (data) => {
return console.log(
`${`>`.grey} ${`ERROR`.underline.red} ${
`${chalk.grey(`>`)} ${chalk.underline.red(`ERROR`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const critical = (data) => {
return console.log(
`${`>`.grey} ${`CRITICAL`.underline.red} ${
`${chalk.grey(`>`)} ${chalk.underline.red(`CRITICAL`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const success = (data) => {
return console.log(
`${`>`.grey} ${`SUCCESS`.underline.green} ${
`${chalk.grey(`>`)} ${chalk.underline.green(`SUCCESS`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const warn = (data) => {
return console.log(
`${`>`.grey} ${`WARNING`.underline.yellow} ${
`${chalk.grey(`>`)} ${chalk.underline.yellow(`WARNING`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const await = (data) => {
return console.log(
`${`>`.grey} ${`WAITING`.underline.cyan} ${
`${chalk.grey(`>`)} ${chalk.underline.cyan(`WAITING`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const complete = (data) => {
return console.log(
`${`>`.grey} ${`COMPLETE`.underline.green} ${
`${chalk.grey(`>`)} ${chalk.underline.green(`COMPLETE`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const debug = (data) => {
return console.log(
`${`>`.grey} ${`DEBUG`.underline.magenta} ${
`${chalk.grey(`>`)} ${chalk.underline.magenta(`DEBUG`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const fatal = (data) => {
return console.log(
`${`>`.grey} ${`FATAL`.underline.red} ${
`${chalk.grey(`>`)} ${chalk.underline.red(`FATAL`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const info = (data) => {
return console.log(
`${`>`.grey} ${`INFO`.underline.white} ${
`${chalk.grey(`>`)} ${chalk.underline.white(`INFO`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const note = (data) => {
return console.log(
`${`>`.grey} ${`NOTE`.underline.grey} ${
`${chalk.grey(`>`)} ${chalk.underline.grey(`NOTE`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const pending = (data) => {
return console.log(
`${`>`.grey} ${`PENDING`.underline.magenta} ${
`${chalk.grey(`>`)} ${chalk.underline.magenta(`PENDING`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const start = (data) => {
return console.log(
`${`>`.grey} ${`START`.underline.green} ${
`${chalk.grey(`>`)} ${chalk.underline.green(`START`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const watch = (data) => {
return console.log(
`${`>`.grey} ${`WATCHING`.underline.yellow} ${
`${chalk.grey(`>`)} ${chalk.underline.yellow(`WATCHING`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const ready = (data) => {
return console.log(
`${`>`.grey} ${`READY`.underline.blue} ${
`${chalk.grey(`>`)} ${chalk.underline.blue(`READY`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const command = (data) => {
return console.log(
`${`>`.grey} ${`COMMAND`.underline.cyan} ${
`${chalk.grey(`>`)} ${chalk.underline.cyan(`COMMAND`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const event = (data) => {
return console.log(
`${`>`.grey} ${`EVENT`.underline.yellow} ${
`${chalk.grey(`>`)} ${chalk.underline.yellow(`EVENT`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const database = (data) => {
return console.log(
`${`>`.grey} ${`DATABASE`.underline.grey} ${
`${chalk.grey(`>`)} ${chalk.underline.grey(`DATABASE`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const shard = (data) => {
return console.log(
`${`>`.grey} ${`SHARD`.underline.green} ${
`${chalk.grey(`>`)} ${chalk.underline.green(`SHARD`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

const cluster = (data) => {
return console.log(
`${`>`.grey} ${`CLUSTER`.underline.blue} ${
`${chalk.grey(`>`)} ${chalk.underline.blue(`CLUSTER`)} ${chalk.grey(
`[${hours < 10 ? '0' + hours : hours}:${minutes < 10 ? 'O' + minutes : minutes}:${
seconds < 10 ? '0' + seconds : seconds
}]`.gray
} ${`${data}`.white}`
}]`
)} ${chalk.white(`${data}`)}`
);
};

Expand Down
Loading

0 comments on commit d66b6ca

Please sign in to comment.