Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase reputation with single user tagging #90

Merged
merged 3 commits into from
Oct 27, 2021

Conversation

ahmadsyafiqruhazat
Copy link
Contributor

@ahmadsyafiqruhazat ahmadsyafiqruhazat commented Oct 22, 2021

Closes #71

  • Update bot.hears(/thank you|thanks|👍|💯|👆|🆙|🔥/i logic with checking of mentions
  • For entity type mentions we get the username and query db for the User data
  • For entity type text_mentions User is provided
  • When multiple users are mentioned, bot responds with message and reputation not increased
  • Added test case and mock

Edge Case

Feature wont work if user changes their username.

@ruqqq
Copy link
Contributor

ruqqq commented Oct 23, 2021

Looks good. Thanks @ahmadsyafiqruhazat. Curious, why do you think if user changed username it would not work?

Copy link
Contributor

@ruqqq ruqqq left a comment

Choose a reason for hiding this comment

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

Left some comments for minor things... otherwise, looks good!

@ahmadsyafiqruhazat
Copy link
Contributor Author

Looks good. Thanks @ahmadsyafiqruhazat. Curious, why do you think if user changed username it would not work?

Added a failing test (skipped), to simulate it! @ruqqq

@ruqqq ruqqq merged commit 05b6ac4 into SGTinkers:master Oct 27, 2021
@ahmadsyafiqruhazat ahmadsyafiqruhazat deleted the user-tagging branch January 26, 2022 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ReputationBot should award/demote points via user tagging too (@user)
2 participants