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

Honor required badges to use command - Helps with Issue #51 #93

Closed
wants to merge 10 commits into from

Conversation

parithon
Copy link
Collaborator

@parithon parithon commented Mar 16, 2019

Purpose

We need a way for broadcasters to limit who can use this command. This PR allows the broadcaster to set the required badges a user must have in order to use the command. Users who do not have the badge will be ignored. The broadcaster will always be allowed to use the command.

Changed files

  • package.json Added a new setting to capture the required badges: twitchHighlighter.requiredBadges
  • constants.ts Added the new setting to the constants.
  • twitchChatClient.ts Forwards the requiredBadges (array) setting to the twitch server using the start params.
  • twitchLanguageServer.ts Captures the badges when a user sends a message and verifies the user has a required badge before continuing to parse the message for our highlight command.
  • twitchLanguageServer.test.ts Added the new parameter requirements for the parseMessage function and added tests to ensure the requiredBadges exists and fails (as we expect) when they don't.

Partially Addresses

#51

@parithon parithon marked this pull request as ready for review April 12, 2019 07:05
@parithon parithon requested a review from clarkio April 12, 2019 07:05
@parithon
Copy link
Collaborator Author

I'm closing my PRs in order to advance development on my local branch and send a complete refactor PR.

@parithon parithon closed this Aug 20, 2019
CodemanCodes pushed a commit to CodemanCodes/vscode-twitch-highlighter that referenced this pull request Aug 27, 2019
New 'install' command to install themes! Closes clarkio#93
@parithon parithon deleted the ratelimit branch October 1, 2019 12:15
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.

None yet

2 participants