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

Implementation of ?++ command for users with Admin Roles (Core, Maintainer, and Admin) #188

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

timothyling1994
Copy link
Contributor

1.Describe the changes made:
-Added regex to detect '?++' command
-Verified that the user is able to use '?++' command by checking their roles, only admin, maintainer, or core roles are able to use this command.
-Bot outputs appropriate message if user is not an admin/core/maintainer user
-If user does have an admin role, the API request to the award Points API is populated with an argument of 2 to award 2 points
-Resolved UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message that was being caused in some use cases because we were passing empty Promises in points.js to botEngine.js. We would then try to message.channel.send that empty response, causing the warning above.
-Added test cases in points.test.js for the ?++ command

  1. If this PR is related to an open issue please reference it with the # operator and the issue number below:
    Extend ++ command to award double points for good questions #176

@timothyling1994 timothyling1994 changed the title Removed .DS_Store and botCommands/.DS_Store' Implementation of ?++ command for users with Admin Roles (Core, Maintainer, and Admin) Oct 5, 2021
@timothyling1994
Copy link
Contributor Author

timothyling1994 commented Oct 5, 2021

@twalton83 Removed .DS_Store and botCommands/.DS_Store

For reference, here's the original thread:

https://github.com/TheOdinProject/odin-bot-v2/pull/185

@twalton83
Copy link
Contributor

twalton83 commented Oct 5, 2021

You need to be sure that you're on the branch that has your features and add those files :) I accidentally closed the last PR, so be sure to include your changes.

@timothyling1994
Copy link
Contributor Author

timothyling1994 commented Oct 5, 2021

@twalton83 To clarify, the issue is that this current PR is only showing the latest commit "removed DS store" and not the previous commits I made?

When I do 'git status' locally, I get:

Your branch is up to date with 'origin/main'.

I can confirm that my local main branch and my remote repo main branch (which should be tracked by this PR?) have all my changes. Can you point me in the right direction on the next steps?

I found this StackOverflow post that might be relevant: https://stackoverflow.com/questions/35407770/github-changes-ignored-after-revert-git-cherrypick-git-rebase/35408117#35408117

@twalton83
Copy link
Contributor

Are you on Discord? The fix is going to be a bit involved and it will be easier to communicate in real time.

@timothyling1994
Copy link
Contributor Author

yes, ill send you a dm

@twalton83 twalton83 merged commit 845ed1e into TheOdinProject:main Oct 21, 2021
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.

2 participants