alveusgg / extension

Twitch extension for Alveus Sanctuary, allowing stream viewers to learn more about the ambassadors at the sanctuary.
https://www.twitch.tv/alveussanctuary
Other
72 stars 19 forks source link

Handle channels separately #34

Closed abdullahmorrison closed 1 year ago

abdullahmorrison commented 1 year ago

Discussed in https://github.com/abdullahmorrison/AlveusTwitchExtension/discussions/33

Originally posted by **pjeweb** January 23, 2023 I would propose to change the extension such that it only reacts to events (commands/title changes) for the channel it is displayed on. E.g. do not open a card on Mayas stream if a command is sent in the Alveus chat. I am not sure where you would get that info. Maybe this would need to be set in the extension configuration by the streamer?

This would require the extension to know what channel it is installed in. If that can be done, the useChatCommand hook can also return what channel the chat command is called in.

MattIPv4 commented 1 year ago

It sounds like the auth callback in the extension API should give you the current channel id: https://discuss.dev.twitch.tv/t/get-channel-id-where-the-extension-is-currently-displayed/16583

pjeweb commented 1 year ago

I would take a shot at implementing this, if that is okay?