tisboyo / Twitch_Bot

4 stars 2 forks source link

Record and announce hosts #113

Closed baldengineer closed 3 years ago

baldengineer commented 3 years ago

Since I (seem to miss) Hosts on the activity feed, it'd be great if the bot could say in chat when someone is hosting.

tisboyo commented 3 years ago

Currently unable to find an end point that does this. Still researching.

tisboyo commented 3 years ago

https://tmi.twitch.tv/hosts?include_logins=1&target=125957551 returns the channels hosting...

Sample { "hosts": [{ "host_id": 58141105, "target_id": 21281491, "host_login": "its_reds", "target_login": "epicfuel", "host_display_name": "Its_reds", "target_display_name": "EpicFuel" }, { "host_id": 25622621, "target_id": 21281491, "host_login": "decicus", "target_login": "epicfuel", "host_display_name": "Decicus", "target_display_name": "EpicFuel" }, { "host_id": 74808402, "target_id": 21281491, "host_login": "klumaak1", "target_login": "epicfuel", "host_display_name": "KlumaAK1", "target_display_name": "EpicFuel" }] }

Going to require checks on a schedule. Maybe only do them while the stream is active to prevent excessive queries.

tisboyo commented 3 years ago

Also, this is part of the old api and could be depreciated at any point.

tisboyo commented 3 years ago

This is going to be dependent on #123, so delaying implementation.

tisboyo commented 3 years ago

May have found a new method of capturing these, msg.msg-id == 'host_success_viewers' Needs tested when stream is live.

tisboyo commented 3 years ago

Interesting quote from https://discuss.dev.twitch.tv/t/irc-not-receiving-notice-when-there-is-an-incoming-host/23366/2

Host notifications are only sent to the broadcasters chat feed so you’ll have to logged into chat as the broadcaster ie same user as the channel.

Tested streaming on main account and hosting on bot account for 10 minutes and never received a notification.

tisboyo commented 3 years ago

Logged in with streamer account on bot and still received no notices of the host. Starting to suspect a permission issue, maybe streamlabs is requesting a permission we aren't so they are able to get that data.

tisboyo commented 3 years ago

For future reference streamlabs_scope = [ "user_read", "channel_subscriptions", "user_subscriptions", "chat:read", "channel_editor", "bits:read", "channel:read:subscriptions", "channel:read:polls", "channel:manage:polls", ]

tisboyo commented 3 years ago

Attempted using streamlabs permissions plus the ones we had before and still never got an autohost notification using the bot account. There has to be a hidden endpoint they have access to.

tisboyo commented 3 years ago

Not looking like this is going to happen soon, but I'm not forgetting about it. Closed, again.