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

Twitch integration request #43

Open
ilNikk opened this issue May 23, 2023 · 6 comments
Open

Twitch integration request #43

ilNikk opened this issue May 23, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@ilNikk
Copy link
Contributor

ilNikk commented May 23, 2023

Hi! Your code look amazing, its possibile to integrate Twitch.tv chat? Thanks

@cdfmlr
Copy link
Owner

cdfmlr commented May 24, 2023

It's possible and not hard to do (i guess).

However I am not that familiar with twitch. Is there any API or library to get the stream comments from twitch?

@cdfmlr cdfmlr added the question Further information is requested label May 24, 2023
@ilNikk
Copy link
Contributor Author

ilNikk commented May 24, 2023

Hi! thx for reply!
there is a easy python API for twitch https://pytwitchapi.readthedocs.io/en/stable/
or also have a IRC connection but idk if it possible grab messages with this https://dev.twitch.tv/docs/irc/

@cdfmlr
Copy link
Owner

cdfmlr commented May 25, 2023

Hi! thx for reply!
there is a easy python API for twitch https://pytwitchapi.readthedocs.io/en/stable/
or also have a IRC connection but idk if it possible grab messages with this https://dev.twitch.tv/docs/irc/

Cool. We can take either to make it.

But I won't implement it recently. I am a bit busy this days. (sucks exams). And I plan to works on #32 and #26 first when i am freed to. I believe the Twitch integration jobs will be easier & more clear after these issues resolved.

Meanwhile, please feel free to contribute code to make it if you'd like. . It could be a lot hard cuz, I am sorry for that, everything are not well documented now and you have to read my awful codes to understand anything. But if you're willing to give it a try, the following information may be helpful:

The problem is that the comments getter module is not well designed at first. The blivechat (comments getter for BiliBili) is hard-coupled into the system. So we have to decouple it, make an abstract ChatInput interface (#26 will make this) and then implement it. Another option is passing messages through the TextInFromHTTP interface (see https://github.com/cdfmlr/muvtuberdriver/blob/41390d6aca94ff78f041d2052bf274cfd0286df7/http.go#L21) though it looks more costly.

Let me know if you have any other questions.

@cdfmlr cdfmlr added enhancement New feature or request and removed question Further information is requested labels May 25, 2023
@ilNikk
Copy link
Contributor Author

ilNikk commented May 25, 2023

Thx for your info!
I made a draft code that push Twitch message to the driver.
In this case i simply use Json POST. i not debugging all containers yet but basicly it work for now!

https://github.com/nicolapanegos/twitchbotio/blob/master/twitchbotio.py

If you have any suggestions I'm listening :D

@cdfmlr
Copy link
Owner

cdfmlr commented May 26, 2023

https://github.com/nicolapanegos/twitchbotio/blob/master/twitchbotio.py

I'm afraid your repo is unreachable (404). 😭

Is it private?

@ilNikk
Copy link
Contributor Author

ilNikk commented May 26, 2023

Ops sorry, now its public! :)
https://github.com/nicolapanegos/twitchbotio

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
Status: Todo
Development

No branches or pull requests

2 participants