platformServiceSettings

API - Allows controlling of the custom lua streaming platform

You can use this to hook Stream Avatars up to any service you want.

function output(string_message)
    log('the app wants to send a message to your viewers...');
    log(string_message);
end

return function()

    local app = getApp();

    addEvent('luaPlatformOutput', 'output'); --attaches the event to output()

    local myUserId = 1234;
    local myUserName = 'clonzeh_lua';

    app.platformServiceSettings.SetStreamer(myUserId, myUserName);
    wait(3);
    app.platformServiceSettings.SetUserJoin(myUserId, myUserName);
    wait(3);
    app.platformServiceSettings.AddMessage(myUserId, myUserName, 'hello test');
    wait(3);
    app.platformServiceSettings.AddMessage(myUserId, myUserName, '!mass jump');
    wait(3);
    app.platformServiceSettings.AddMessage(myUserId, myUserName, '!currency');
    wait(3);
    app.platformServiceSettings.SetFollower(myUserId, true);
    app.platformServiceSettings.SetSubscriber(myUserId, true);
    app.platformServiceSettings.SetModerator(myUserId, true);
    wait(1);
    
    app.platformServiceSettings.PlatformCurrencyDonation(myUserId, myUserName, 50, 1000); 
    --they donated 50, the lifetime total is now 1000

    app.platformServiceSettings.CustomCommandRedemption(myUserId, myUserName, 'Redemption Title Here',
        'extra user input here');
    wait(1);
    app.platformServiceSettings.SetUserLeave(myUserId);
    keepAlive();
end

Last updated

OSZAR »