Bots Home
|
Create an App
Jess_Club_Bot1
Author:
jess_nya
Description
Source Code
Launch Bot
Current Users
Created by:
Jess_Nya
// Kittens Club Bot // CB app settings cb.settings_choices = [ { name: 'kcText', label: 'Text to put in front of Kitten members messages (e.g. KC), the text will be put inside square brackets [ ]', type: 'str', minLength: 0, maxLength: 15, required: false, defaultValue: 'KC' }, { name: 'NoteBK', label: 'Notification Background Color HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, defaultValue: '2ECCFA' }, { name: 'kcMinTip', label: 'Minimum tip to become KC Club member', type: 'int', minValue: 1, defaultValue: 1000 }, { name: 'kcAnnounce', label: 'Text to show when someone tips to become a KittenClub 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 Kitten Club, Cuddels await' }, { name: 'kcRainText', label: 'Text to use for Kitten Notifier lines', type: 'str', minLength: 0, maxLength: 80, required: false, defaultValue: 'Meow' }, { name: 'kcRainCount', label: 'Number of lines of Kitten notifyer Lines', type: 'int', minValue: 1, maxValue: 15, defaultValue: 1 }, { name: 'kcTextColor', label: 'KittenClub members text color - HTML colour code without starting \'#\' e.g. (FFFFFF is white)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: '2ECCFA' }, { name: 'kcBGColor', label: 'KittenClub members background color - HTML colour code without starting \'#\' e.g. (000000 is black)', type: 'str', minLength: 0, maxLength: 6, required: false, defaultValue: 'F6CEF5' }, { name: 'kcMemberList', label: 'List of current KittenClub members, separated by commas (and they need to be the CB username exactly)', type: 'str', minLength: 0, maxLength: 10240, required: false, defaultValue: 'Jessica_Nya' }, { name: 'kcRoomEntry', label: 'What is said when a KittenClub member Enters the Room', type: 'str', minLength: 0, maxLength: 1000, defaultValue: 'welcome MEMBERNAME all the Cuddles await you! ' }, { name: 'KcRoomExit', label: 'What is said when someone leaves the room and is in the Kitten club', type: 'str', minLength: 0, maxLength: 1000, defaultValue: 'Bye MEMBERNAME You are sooo going to miss the cuddles now!' } ]; var kcMembers = {}; cb.onEnter(function (user) { if (isKC(user['user'])) { var Welco_ur = cb.settings.kcRoomEntry.replace("MEMBERNAME",user['user']); cb.sendNotice(Welco_ur); } }); cb.onTip(function (tip) { var amountTipped = parseInt(tip['amount']); if (amountTipped == cb.settings.kcMinTip) { // Make Kitten Club and announce it var announcement = cb.settings.kcAnnounce.replace("MEMBERNAME", tip['from_user']); makeKC(tip['from_user']); for (var i = 0; i < cb.settings.kcRainCount; i++) { cb.chatNotice(cb.settings.kcRainText); } cb.chatNotice(announcement); } }); function isKC(username) { return (username in kcMembers); } function makeKC(username) { kcMembers[username] = { 'u': 1 }; } cb.onMessage(function (msg) { var u = msg['user']; if (isKC(u)) { msg['background'] = '#' + cb.settings.kcBGColor; msg['c'] = '#' + cb.settings.kcTextColor; msg['m'] = "[" + cb.settings.kcText + "] " + msg['m']; } return msg; }); function grabSettings() { cb.log("starting grabbing settings"); // Get Kitten Club if (cb.settings.kcMemberList) { var kcMemberSettings = cb.settings.kcMemberList.split(','); for (var ii = 0; ii < kcMemberSettings.length; ii++) { var clean = kcMemberSettings[ii].toLowerCase().replace(/ /g, ""); kcMembers[clean] = { 'u': 1 }; } } cb.log("finished grabbing settings"); } grabSettings();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.