Bots Home
|
Create an App
asfasfsaf
Author:
batman
Description
Source Code
Launch Bot
Current Users
Created by:
Batman
cb['settings_choices'] = [{ name: 'replaceLetter', type: 'str', minLength: 1, maxLength: 1, label: 'Replace Letter', defaultValue: 's', required: true }, { name: 'replacementLetter', type: 'str', minLength: 1, maxLength: 10, label: 'Replacement Letter', defaultValue: 'th', required: true }, { name: 'broadcaster', type: 'choice', choice1: 'True', choice2: 'False', defaultValue: 'True', label: 'Normal Chat for Broadcaster' }, { name: 'mods', type: 'choice', choice1: 'True', choice2: 'False', defaultValue: 'True', label: 'Normal Chat for Mods' }, { name: 'fanclub', type: 'choice', choice1: 'True', choice2: 'False', defaultValue: 'False', label: 'Normal Chat for FanClub' }, { name: 'tokenholders', type: 'choice', choice1: 'True', choice2: 'False', defaultValue: 'False', label: 'Normal Chat for Token Holders' }, { name: 'greys', type: 'choice', choice1: 'True', choice2: 'False', defaultValue: 'False', label: 'Normal Chat for Greys' }]; var bBroadcaster = 0; var bMods = 0; var bFanclub = 0; var bTokenHolders = 0; var bGreys = 0; var find = ''; var replace = ''; cb['onMessage'](function (a) { var b = 0; if (1 == bBroadcaster && a['user'] == cb['room_slug']) b = 1; else if (1 == bMods && true == a['is_mod']) b = 1; else if (1 == bFanclub && true == a['is_fanclub']) b = 1; else if (1 == bTokenHolders && true == a['has_tokens'] && a['user'] != cb['room_slug']) b = 1; else if (1 == bGreys && false == a['has_tokens'] && false == a['in_fanclub'] && false == a['is_mod'] && a['user'] != cb['room_slug']) b = 1; if (1 === b) a['m'] = processMessage(a['m']); return a; }); function processMessage(a) { var b = []; b = a['split'](' '); for (var c = 0; c < b['length']; c++) if (b[c][0] != ':') b[c] = replaceStr(b[c]); return b['join'](' '); } function replaceStr(a) { for (var b = 0; b < find['length']; b++) a = a['replace'](new RegExp(find[b], 'gi'), replace); return a; } function init() { cb['sendNotice']('-----------------------------------------\n--- Cindy Brady Bot v1.10\n--- Developed By: KellyNumberFan\n-----------------------------------------'); find = cb['settings']['replaceLetter']; replace = cb['settings']['replacementLetter']; bBroadcaster = cb['settings']['broadcaster'] === 'False' ? 1 : 0; bMods = cb['settings']['mods'] === 'False' ? 1 : 0; bFanclub = cb['settings']['fanclub'] === 'False' ? 1 : 0; bTokenHolders = cb['settings']['tokenholders'] === 'False' ? 1 : 0; bGreys = cb['settings']['greys'] === 'False' ? 1 : 0; } String['prototype']['trim'] = function () { return this['replace'](/^\s+|\s+$/g, ''); }; init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.