Apps Home
|
Create an App
molly-ytestbed
Author:
chaterapptestbench
Description
Source Code
Launch App
Current Users
Created by:
Chaterapptestbench
/** * Bot: Talk To See EVERYTHING * Version: 1.02 * Author: james greeno * Date: 05.17.2018 */ // Talk To See EVERYTHING // Created by: jimgreenobigcock // Only users that can talk can see the show // They must say someting to see the cam // In combination with your setttings you can block grey's or users that did not tip. anons can never talk so they can never see // commands: // /start - start the show, user that could talk at a previous show must talk again to see // /stop - stop the show , all users can see again // /remove username - remove one user from seeing (e.g. after banning) , command is visible in the room // /add username - give a user access without letting him talk , output is only visible for the broadcaster and the user // /check username - check if a user can see the show , output is only visible for the broadcaster // /list - generates a list of all users that can see the show , output is only visible for the broadcaster cb.settings_choices = [ {name: 'hide_message', label: 'Cam Message', type: 'str', minLength: 1, maxLength: 256, defaultValue: 'Say someting to see the show.' }, ]; cb.onMessage(function (msg) { if (msg['X-Spam'] == true){ return msg} var message = msg['m']; var user = msg['user']; var username = ""; var usermsg = ""; if (cb.room_slug === user && message == '/start' && !cb.limitCam_isRunning()) { output(cb.room_slug + ' started "Talk To See". Say someting to see the show.'); cb.limitCam_removeAllUsers(); cb.limitCam_start(cb.settings.hide_message); } if (cb.room_slug === user && message == '/stop' && cb.limitCam_isRunning()) { output(cb.room_slug + ' stopped "Talk To See". '); cb.limitCam_stop(); } if (cb.room_slug === user && message.substring(0, 7) == '/remove' && cb.limitCam_allUsersWithAccess().length > 0 && cb.limitCam_isRunning()) { username = message.substring(8, message.length); if (username){ if (cb.limitCam_userHasAccess(username)) { cb.limitCam_removeUsers([username]); output(cb.room_slug + ' removed ' + username + ' from the show!'); } else{ output(username + ' is not in the show.', user); } } } if (cb.room_slug === user && message.substring(0, 4) == '/add') { username = message.substring(5, message.length); if (username){ if(cb.limitCam_isRunning()){ cb.limitCam_addUsers([username]); output ('Welcome '+username+'. '+user+' gave you access to see the show',username); output (username+' can see the show.',user); } } } if (cb.room_slug === user && message.substring(0, 6) == '/check') { username = message.substring(7, message.length); if (username){ if (cb.limitCam_userHasAccess(username)) { output(username + " can see the show!",user); } else { output(username + " can not see the show!",user); } } } if (cb.room_slug === user && message === '/list') { var userlist = cb.limitCam_allUsersWithAccess(); if (userlist.length > 0) { output("" + userlist.length + (userlist.length > 1 ? " users" : " user") + " in show: " + cbjs.arrayJoin(userlist, ", "),user); } else { output("No users in show.",user); } } if (cb.room_slug === user && message[0] == '/') { msg['X-Spam'] = true; } if (cb.room_slug !== user){ if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), user)) { if(cb.limitCam_isRunning()){ cb.limitCam_addUsers([user]); output ('Welcome '+user+'. You can see the show',user); output (user+' talked for the first time and can now see the show.',cb.room_slug); } } } return msg; }); function output(message,usermsg) { cb.chatNotice(message,usermsg); } cb.tipOptions(function(user) { return {options:[{label: 'choice1'}, {label: 'choice2'}, {label: 'choice3'}], label:"Select a choice:"}; });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.