Bots Home
|
Create an App
experimenting
Author:
i_love_asian_women
Description
Source Code
Launch Bot
Current Users
Created by:
I_Love_Asian_Women
cbjs.arrayContains = (haystack, needle) => Array.prototype.includes.call(haystack, needle) cb.tipOptions(function(user) { return { options: [{ label: 'choice1' }, { label: 'choice2' }, { label: 'choice3' }], label: "Select a choice:" }; }); function callme() { cb.chatNotice("hello world"); cb.setTimeout(callme, 10000) } cb.setTimeout(callme, 10000) cb.sendNotice("message", 'user', '#000000', '#ffffff', "bold", 'group') var total_tipped = 0; cb.onTip(function(tip) { total_tipped += parseInt(tip['amount']) cb.chatNotice("Total Tipped: " + total_tipped); cb.chatNotice(tip); }); cb.onMessage(function(msg) { if (msg['m'] == '/stats') { msg['X-Spam'] = true; } return msg; }); cb.onMessage(function(message) { cb.chatNotice(message); }); cb.onMessage(function(msg) { msg['background'] = '#9F9'; return msg; }); cb.changeRoomSubject("new_subject") cb.onEnter(function(user) { cb.chatNotice('Welcome ' + user['user'] + '!'); }); cb.onLeave(function(user) { cb.chatNotice('Bye ' + user['user'] + '!'); }); function callme() { cb.chatNotice("hello world"); cb.setTimeout(callme, 10000); } var id = cb.setTimeout(callme, 10000) cb.cancelTimeout(id); cb.changeRoomSubject("new_subject") var backgroundImage = '05b83220-1ccc-4871-9333-70f97488de00'; var tipsReceived = 3545; var highestTip = 'tipDaddy 135'; var lastTipReceived = 'big_tipper 25'; var fontSize = 11; cb.onDrawPanel(function(user) { return { "template": "image_template", "layers": [{ 'type': 'image', 'fileID': backgroundImage }, { 'type': 'text', 'text': 'TIPS RECEIVED', 'top': 5, 'left': 61, 'font-size': fontSize, 'color': 'orange', }, { 'type': 'text', 'text': 'HIGHEST TIP', 'top': 29, 'left': 73, 'font-size': fontSize, 'color': 'orange', }, { 'type': 'text', 'text': 'LATEST TIP RECEIVED', 'top': 52, 'left': 28, 'font-size': fontSize, 'color': 'orange', }, { 'type': 'text', 'text': tipsReceived, 'top': 5, 'left': 147, 'font-size': fontSize, 'color': 'white', }, { 'type': 'text', 'text': highestTip, 'top': 29, 'left': 147, 'font-size': fontSize, 'color': 'white', }, { 'type': 'text', 'text': lastTipReceived, 'top': 51, 'left': 147, 'font-size': fontSize, 'color': 'white', }, ], }; }); cb.drawPanel(); cb.settings_choices = [{ name: 'tokens_per_minute_to_be_king', type: 'int', minValue: 1, maxValue: 99, defaultValue: 5, label: "Tokens per Minute" }, { name: 'remove_king_when', type: 'choice', choice1: 'someone else outbids', choice2: 'score decays to 0', defaultValue: 'someone else outbids' }, { name: 'min_start_tokens', type: 'int', minValue: 1, maxValue: 1000, defaultValue: 100, label: "Cost to Join Before Show Starts" }, { name: 'min_join_tokens', type: 'int', minValue: 0, maxValue: 1000, defaultValue: 100, label: "Cost to Join During Show. Set to 0 to Disable Joining During Show." }, { name: 'hide_message', label: 'Cam Message', type: 'str', minLength: 1, maxLength: 256, defaultValue: 'Secret Show in progress! Tip at least 100 tokens to join in on the fun!' }, ]; cb.onTip(function(tip) { if (!cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), tip['from_user'])) { if (!cb.limitCam_isRunning() && parseInt(tip['amount']) >= cb.settings.min_start_tokens) { output('Added ' + tip['from_user'] + ' to secret show!'); cb.limitCam_addUsers([tip['from_user']]); } if (cb.limitCam_isRunning() && parseInt(tip['amount']) >= cb.settings.min_join_tokens && cb.settings.min_join_tokens > 0) { output('Added ' + tip['from_user'] + ' to secret show!'); cb.limitCam_addUsers([tip['from_user']]); } } }); cb.onMessage(function(msg) { var message = msg['m']; var user = msg['user']; var username = ""; if (cb.room_slug === user && message == '/start' && !cb.limitCam_isRunning()) { output(cb.room_slug + ' has started the show!'); cb.limitCam_start(cb.settings.hide_message); } if (cb.room_slug === user && message == '/stop' && cb.limitCam_isRunning()) { output(cb.room_slug + ' has stopped the show!'); 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 (cbjs.arrayContains(cb.limitCam_allUsersWithAccess(), username)) { cb.limitCam_removeUsers([username]); output(cb.room_slug + ' has removed ' + username + ' from the show!'); } } if (cb.room_slug === user && message.substring(0, 6) == '/check') { username = message.substring(7, message.length); if (cb.limitCam_userHasAccess(username)) { output(username + " is in the show!"); } else { output(username + " is not in the show!"); } } 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, ", ")); } else { output("No users in show."); } } if (message[0] == '/') { msg['X-Spam'] = true; } return msg; }); function output(message) { cb.chatNotice(message); } cb.onMessage(function(msg) { cb.log(msg); }); if ('msg' ['user'] == cb.room_slug) { cb.chatNotice("Message sent by broadcaster") }
© Copyright Chaturbate 2011- 2026. All Rights Reserved.