CodecademyCommunity / codecademy-discord-bot

Custom moderation bot for the official Codecademy Community Discord server.
https://codecademycommunity.github.io/
MIT License
11 stars 1 forks source link

Added hasTargetUser helper function #209

Closed lyallstewart closed 2 years ago

lyallstewart commented 2 years ago

What issue is this solving?

Closes #204

Description

Adds a helper function (hasTargetUser.js) to process the user checks and replies in a single place.

Any helpful knowledge/context for the reviewer?

Please make sure you've attempted to meet the following coding standards

lyallstewart commented 2 years ago

It seems that something I've done has updated a lot of package-lock.json - have I done something wrong or is that OK? 😅

lyallstewart commented 2 years ago

I assume it was when I ran npm install setting up my local environment, I've just reset it to what is in the rest of the repo as I assume that's the right one

aedwardg commented 2 years ago

@lyallstewart you were right that you shouldn't be updating the package-lock.json if you're not changing any dependencies. We've had this problem before and it comes from a difference in Node and NPM versions when running npm install. For now, if you get any changes to package-lock.json without changing any dependencies, just discard those changes until we've figured out a good solution down the road.

You did the right thing by removing the changes, though ideally it would have been better to do that w/no added commits (I can show you how to do that sometime if you're not sure how). It looks like there's still an outstanding change to that file though.
image

If you can add a blank line at the bottom of the file and push that change up, it should go back to only showing hasTargetUser.js 😄

lyallstewart commented 2 years ago

There we go, I think I've finally managed to get rid of any changes 😀

lyallstewart commented 2 years ago

Thanks! I'll open seperate PRs actually implementing it in batches 🙂

aedwardg commented 2 years ago

@lyallstewart sorry I didn't get around to reviewing this -- been pretty busy with work this week. Hoping to maybe catch up on some open source this weekend.

If you're looking to implement it in follow-up PRs, please open up issues for those PRs so we can keep track of which commands are being worked on in each one. Thanks!