BudWorks / Akaei

A fun, cute, and modern Discord bot featuring pets, economy, leveling, and more. Built with Discord.js and written in Typescript.
Mozilla Public License 2.0
1 stars 0 forks source link

✨ Add /work and /crime commands with cooldown logic #68

Closed JustYourBud closed 1 year ago

JustYourBud commented 1 year ago

Additions

JustYourBud commented 1 year ago

@jonahbedouch

Having crime be a subclass of work feels weird, since then you're doing the work of choosing a job description twice, once for work and then overriding it with crime. Maybe create a generic "Job" class with just the payout and message getter logic, then extend for both work and crime with the actual assignment of messages?

Ended up doing something similar to this as per our co-authored https://github.com/BudWorks/Akaei/pull/68/commits/c2fee68011b39ee2ea3a444b71bf3ec69ecec6de commit.

You use [] to represent an array in interfaces which is fine, but to me I always have found the Array<> notation more intuitive. This is an optional change but I'd recommend it since it's easy to miss the braces.

Did this as well in https://github.com/BudWorks/Akaei/pull/68/commits/8db0316bf76dac658204c9dd7709e5dbf2c873d4.

Only thing I didn't do was the Discord timestamp suggestion, only because I'm picky about how the time displays and I just don't like how Discord handles them for this specific scenario. I'm sure I'll find a use for them though.

Everything's been tested and works so if you wanna re-review it for anything else that would be great 👍

Changes

JustYourBud commented 1 year ago

Yeah that was a bug, it's all fixed up now and works as intended.

Fixes