CustomAPI request for user's time in chat

I was wondering if anyone had a CustomAPI or something I can use for Nightbot, that can show how long a user has been in Twitch chat for a stream or just in total.
For example, someone does “!chattime [User]” and it comes up with “[User] has been in the stream for __ hours __minutes __seconds.” or “[User] has been in the channel’s chat for __hours __minutes __ seconds.”
Being able to simply do “!chattime” and it also be able to just use the command user’s name, would be great.

Thanks for any and all help.

I don’t think you will find an API for this, since it’s not something Twitch exposes. The best bots can do is track user time independently, but that is not a source of truth and is only an estimate at best. Twitch parts you from the chat when the chat is closed, even if you’re watching the stream.

Ah, I figured that would be the case, but figured I’d ask anyway.
Thanks for the reply.

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