Bots Home
|
Create an App
☁ Little Cloud ☁
Author:
sleepytrash
Description
Source Code
Launch Bot
Current Users
Created by:
Sleepytrash
// Little Cloud Club bot // Based on Love Club Lola modified by whitelacelovely // Version 1.0 modified by sleepycass3508 // CB app settings cb.settings_choices = [ { name: 'doColoring', type: 'choice', label: 'Change text and background coloring for Little Clouds (choose colours below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'doText', type: 'choice', label: 'Add text labels in front of Little Clouds (choose text below)?', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes' }, { name: 'ulText', label: 'Text to put in front of Little Cloud members messages, the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'Little Cloud ☁' }, { name: 'ulMinTip', label: 'Minimum tip to become Little Cloud member', type: 'int', minValue: 1, defaultValue: 400 }, { name: 'ulAnnounce', label: 'Text to show when someone tips to become a Little Cloud member, the text MEMBERNAME will be replaced with the username of the new (Note: graphics don\'t work in this text)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: '☁ MEMBERNAME welcome to the Little Cloud Club ☁ !!' }, { name: 'ulTextColor', label: 'Little Cloud members text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000' }, { name: 'ulBGColor', label: 'Little Cloud members background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'FFFFFF' }, { name: 'ulMemberList', label: 'List of current Little Cloud members, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'sleepycass3508' }, { name: 'wgText', label: 'Text to put in front of king Little Cloud messages, the text will be put inside square brackets []', type: 'str', minLength: 0, maxLength: 20, required: false, defaultValue: 'King ☁ Cloud' }, { name: 'wgTextColor', label: 'King Little Cloud text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '000000' }, { name: 'wgBGColor', label: 'King Little Cloud background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'FFFFFF' }, { name: 'wgMemberList', label: 'List of current King Little Cloud users, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'sleepycass3508' }, ]; var ulMembers = {}; var wgMembers = {}; // For auto-silencing at least some of token_wh*re_c*nts usernames var twcRegex = /t.?k.?n.?wh.?r.?_c.?nt.?/i; cb.onMessage(function (msg) { // vars for ease of use var u = msg['user']; if ( isUL(u) ) { msg['background'] = '#' + cb.settings.ulBGColor; msg['c'] = '#' + cb.settings.ulTextColor; msg['m'] = "[" + cb.settings.ulText + "] " + msg['m']; } else if ( isWG(u) ) { msg['background'] = '#' + cb.settings.wgBGColor; msg['c'] = '#' + cb.settings.wgTextColor; msg['m'] = "[" + cb.settings.wgText + "] " + msg['m']; } if (twcRegex.test(u)){ // Auto-silencing at least some of token_wh*re_c*nts usernames msg['X-Spam'] = true; } return msg; }); cb.onTip(function (tip) { var amountTipped = parseInt(tip['amount']); if (amountTipped == cb.settings.ulMinTip) { // Make Little Clouds and announce it var announcement = cb.settings.ulAnnounce.replace("MEMBERNAME", tip['from_user']); makeSD(tip['from_user']); cb.chatNotice(announcement); } }); function isUL(username) { return (username in ulMembers); } function isWG(username) { return (username in wgMembers); } function makeSD(username) { ulMembers[username] = {'u': 1}; } function grabSettings() { cb.log("starting grabbing settings"); // Get clairebears if (cb.settings.ulMemberList) { var ulMemberSettings = cb.settings.ulMemberList.split(','); for (var ii = 0; ii < ulMemberSettings.length; ii++) { var clean = ulMemberSettings[ii].toLowerCase().replace(/ /g,""); ulMembers[clean] = {'u': 1}; } } // Get king tipper of Little Cloud if (cb.settings.wgMemberList) { var wgMemberSettings = cb.settings.wgMemberList.split(','); for (var ii = 0; ii < wgMemberSettings.length; ii++) { var clean = wgMemberSettings[ii].toLowerCase().replace(/ /g,""); wgMembers[clean] = {'u': 1}; } } cb.log("finished grabbing settings"); } grabSettings();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.