UnseenFaith / komada

Komada: Croatian for `pieces`, is a modular bot system including reloading modules and easy to use custom commands.
MIT License
62 stars 31 forks source link

Update log colors #355

Closed HellPie closed 7 years ago

HellPie commented 7 years ago

Proposed Semver Increment Bump: PATCH (None?)

Changes Proposed in this Pull Request (List new items in CHANGELOG.MD)

(If Applicable) What Issue does it fix?

Fixes... Nothing. The logs are more chill if there are no issues.

References

HellPie commented 7 years ago

sorry about the extra commits, gitkraken pulled them when syncing the repo and I didn't notice.

CyberiumShadow commented 7 years ago

dw about the extra commits.

It's just me being an idiot and rewriting public history

CyberiumShadow commented 7 years ago

If this is complete, I will merge this and add a note for Faith to revisit it

HellPie commented 7 years ago

I don't like it either. With klasa it's easier cuz I just disable chalk altogether, but here unless I re-initialize clk on every run(...) there isn't really another way and afaik an if(!var) is still faster than a new var assignment

UnseenFaith commented 7 years ago

Yeah it's fine. This logging system is pretty old and due for an update.

HellPie commented 7 years ago

Btw this allows to potentially let the user specify their own format object, main reason I moved from the switch block to that. My plan was to use it so that IPC could send the bot the preferred logging config, but this also opens it up for more customization for everyone.

CyberiumShadow commented 7 years ago

Ah... Codacy is complaining about nested ternaries

kyranet commented 7 years ago

I agree with Faith, we could remove chalk as a dependency and make it by ourselves using the special characters used for this task. As we are only using this in a single file.

CyberiumShadow commented 7 years ago

@UnseenFaith @kyranet If you guys agree, I will merge this as an interim feature.

kyranet commented 7 years ago

The nested ternary confuses me a bit to be honest, it's a bit hard to read.

CyberiumShadow commented 7 years ago

good enough imo