I imagine it to be kind of like this:
Somebody types “!hours {Username}” in twitch chat,
then Nighbot returns this message: “{User} has spent {x} hours playing dreams.”
I have close to no experience with these kinds of things so I don’t even know if that would be possible but thanks in advance anyway!
You could add and manually update a custom command with the number of hours, but this isn’t something you would be able to automatically display without an API being available which counts the hours in Dreams PS4.