Urlfetch headers are not enough

the headers passed are just not enough
more headers like chat content chat id stream id would help us to identify the actual message that triggered the command and perform task accordingly

this is for youtube.

I am trying to make a clip command using urlfetch
on request i have to go back and find the stream where it got triggered. (breaks when a channel have more than one stream).

nor there is no variable like messageid which i can pass to help myself.
variable like timestamp to tell the current location in stream would have also helpd

Hiya, have you tried using ChatID - Nightbot Docs

1 Like

ok this is genius
thanks for this
but if streamid was passed i would not have to go through different live streams on a channel to find the message.

Not sure exactly what you mean with streamid, like a channel id? ChannelID - Nightbot Docs

as i mentioned in the first post
this is for youtube.
so unlike twitch each livestream have a unique id . that eventually be the videoid after stream ends.

Unfortunately we don’t know the videoId from YouTube as they don’t expose it to us. We have an identifier for the chat room itself and the channel, but there’s not a way to obtain a video identifier from a chat room identifier.

is it the same thing as “continuation_info” ? and looks something like this ?

I guess passing this also kinda prevents me from going on and requesting huge ton of chats
instead I can just continue in case it doesn’t match.

alongside this. does the youtube returns the message_time ? or timestamp in seconds (time from the starting of stream)

anything more would be helpful to have.

The external facing API we use does not have a concept of continuation_info. You can see the documentation at LiveChatMessages  |  YouTube Live Streaming API  |  Google Developers

While we do know when a message was created, you can already log that as the request timestamp as well (it’s close enough). We don’t know what that relation is to when the stream went live, however.

1 Like

I guess having liveChatId is better than having nothing at all.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.