On New Viewer

API -

function yourEvent(user)
    log(user.displayName .. ' is a new viewer to your channel!');
end

return function()

    addEvent('newViewer', 'yourEvent'); --attaches the event to yourEvent()
    keepAlive();
end

Events are asynchronous coroutines.

Last updated