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

I have no idea what I am doing #13

Open
Falinere opened this issue Nov 28, 2020 · 1 comment
Open

I have no idea what I am doing #13

Falinere opened this issue Nov 28, 2020 · 1 comment

Comments

@Falinere
Copy link

I see a video with instafluff talking about adding your channel name and redemption reward id into the code, but the code I see now in the index isn't the same from the video, so trying c/p a url as a browser source just doesn't do anything. Am I missing some kind of crucial, painfully obvious step?

@Vuurvos1
Copy link
Contributor

Vuurvos1 commented Dec 6, 2020

I do not think custom rewards are supported in the current version of HighlightOfMyChat, although you could hack it together yourself.

inside the ComfyJS.onChat you could add a Switch statement or if-else block that executes code based on the reward ids

Example

ComfyJS.onChat = (user, message, flags, self, extra) => {
  if (flags.highlighted) {
    highlightThisMessage(user, message, extra);
  }

  switch (extra.customRewardId) {
    case 'custom id code here':
      msgQueue.push(message.trim());
      playTTS();
      break;

    case 'custom id code here':
      msgQueue.push(message.trim());
      playTTS();
      break;

    // add more cases here
  }
};

with this code you can execute different actions based on different rewards, for example, you could have each reward be a different voice by setting the voice before pushing to msgQueue

like this

case 'custom id code here':
  ttsVoice = 'Brian';
  msgQueue.push(message.trim());
  playTTS();
  break;

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

No branches or pull requests

2 participants