Skip to content
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.

Added == #14

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open

Added == #14

wants to merge 45 commits into from

Conversation

MattLParker
Copy link

Added == and made it where bot can get points as well. @bot == will throw error in log but does work.

@coveralls
Copy link

coveralls commented Dec 14, 2018

Pull Request Test Coverage Report for Build 105

  • 6 of 21 (28.57%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.4%) to 69.61%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/operations.js 0 1 0.0%
src/messages.js 2 4 50.0%
src/events.js 2 7 28.57%
src/points.js 1 8 12.5%
Totals Coverage Status
Change from base Build 89: -2.4%
Covered Lines: 260
Relevant Lines: 350

💛 - Coveralls

@tdmalone
Copy link
Owner

Thanks for this @MattLParker!

There's a few things I'd like to change before getting this into master, primarily fixing a bit of duplicate code and updating some inline documentation. I know you've already put a lot of effort into this; are you interested in some detailed feedback or would you prefer I make the changes and go from there?

@MattLParker
Copy link
Author

MattLParker commented Dec 14, 2018

Hey, We are using the code on a slack group already as is. I'm really just trying to dig into JS, So feel free to make changes and I will watch and learn :)

@tdmalone
Copy link
Owner

No probs! I'll aim to get to it this weekend :)

Thanks again for contributing the code back!

Copy link
Collaborator

@SkUrRiEr SkUrRiEr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General review comments:

  • You didn't note == in the help message in the sendHelp() function in events.js
  • We really need a way to do site-specific customisations, e.g. messages, help text, leaderboard emoji, etc.
  • On tone of the messages: I'm trying to keep them positive and supportive, "How is Frank currently at 143 points" doesn't really work within those goals. (Also you're missing a question mark) - again this is a site-specific thing which we really need to support better (and I really need to get off my ass and sort that out)
  • I was going to comment on the table creation stuff in the score lookup, however that's just copy-pasted from elsewhere, so 🤷‍♂️

The only thing I need sorted pre-approval is the lower case g and removing the site-specific customisations you've made. (You're going to have to carry those changes yourself for the time being)

src/points.js Outdated
* @param {string} operation The mathematical operation performed on the item's score.
* @return {int} The item's new score after the update has been applied.
*/
const GetScore = async( item ) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lower case g to match the style of the other methods.

},
{
probability: 1,
set: [ ':shifty:' ]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you've also joined the cult of the shifty. One of us! One of us! One of us!

@SkUrRiEr
Copy link
Collaborator

Oh, and on tone, I'm happy with the messages for now, I'll work out better wording for us and change that separately.

@SkUrRiEr
Copy link
Collaborator

Oh, and you should update README.md as well.

@MattLParker
Copy link
Author

Our main repo for our slack is https://github.com/winadminsdotorg/PointsBot
I also just added a @user ## to random give or take a point. Follow us if your interested in pulling any features, I won't bother with PRs.

@MattLParker
Copy link
Author

I think that covers those problems?

Repository owner deleted a comment Dec 15, 2018
Copy link
Collaborator

@SkUrRiEr SkUrRiEr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me!

@SkUrRiEr
Copy link
Collaborator

Our main repo for our slack is https://github.com/winadminsdotorg/PointsBot
I also just added a @user ## to random give or take a point. Follow us if your interested in pulling any features, I won't bother with PRs.

90% of the "problems" with this PR is the site-specific stuff. Implementing that properly is next on my list for development (once I get back to this project).

Please feel free to send us more PRs!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants