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

feat(sources): add support for more clip sources #177

Open
3 tasks
jordanshatford opened this issue Oct 30, 2023 · 0 comments
Open
3 tasks

feat(sources): add support for more clip sources #177

jordanshatford opened this issue Oct 30, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jordanshatford
Copy link
Owner

jordanshatford commented Oct 30, 2023

We want the ability to connect to many clip sources (more than just Twitch chat). For example, the following are some clip sources we likely want to support:

These clip sources should implement a common interface:

interface Message {
   timestamp: string
   username: string
   data: string
   isAllowedCommands: boolean
}
connect(username: string, token?: string)
disconnect()
onMessage(source: ClipSource, message: Message)
onMessageDeleted(source: ClipSource, message: Message)  // NOTE: isAllowedCommands is optional here
onTimeout(source: ClipSource,  username: string), onBan(source: ClipSource,  username: string)
onError(error: SourceError, msg: string)  // NOTE: this could be disconnect, etc.  

We should update the queue to track the source of a given clip. This will ensure that we can properly remove clips based on username and source. So we do not accidentally remove a clip submitted by a user with the same name from a different source.

NOTE: when adding multiple sources, a submitter will need to consist of name (of the user submitting) and source (where it was submitted). This means that our moderation settings will also need to be updated to support adding source username pairs.

When we customize a source we should have a description of what they support. For example one source may not be able to detect when a message is deleted, or a user is timed out / banned. Another source may not be able to provide a way to detect moderators / owners and thus will not be able to support commands.

We need to provide a way to configure a given source. IE each source should be able to provide a definition of what it "needs" to be setup (channel name, key, etc.). With this we do not require logging in with Twitch, but doing so allows us to automatically set it up as a source, and support it as a provider (the API requires it).

@jordanshatford jordanshatford added enhancement New feature or request javascript Pull requests that update Javascript code labels Oct 30, 2023
@jordanshatford jordanshatford self-assigned this Feb 27, 2024
@jordanshatford jordanshatford changed the title feat: add support for more clip sources feat(sources): add support for more clip sources Mar 22, 2024
@jordanshatford jordanshatford removed the javascript Pull requests that update Javascript code label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant