Bots Home
|
Create an App
vbottest
Author:
testgaysian
Description
Source Code
Launch Bot
Current Users
Created by:
Testgaysian
// settings cb.settings_choices = [ { name: 'shhh', type: 'str', minLength: 1, maxLength: 255, label: 'Enter list of users to silence (user1, user2, user3)' } ]; // globals var silenced = []; cb.onMessage(function(msg) { var txt = msg['m']; if (msg['user'] == cb.room_slug) { //hide lovense recap spam if (txt.indexOf("-------- LOVENSE INTERACTIVE TOY") != -1) { msg['X-Spam'] = true; } //commands if (msg['user'] == cb.room_slug && msg['m'].charAt(0) == '/') { var sCmd = msg['m'].substring(1, msg['m'].indexOf(' ')); var sArg = msg['m'].substring(sCmd.length+2).trim(); var index = silenced.indexOf(sArg.toLowerCase()); msg['X-Spam'] = true; switch(sCmd) { case "vmute": if (!sArg) { cb.sendNotice("No user name supplied", cb.room_slug, "#FF8000", "", "bold"); return msg; } else { if (index == -1){ silenced.push(sArg.toLowerCase()); cb.log(silenced); cb.sendNotice(sArg + " is silenced, their messages won't show in chat. /vunsilence " + sArg + " to undo.", cb.room_slug, "#01DF01", "", "bold"); } else { cb.sendNotice("That person is already silenced", cb.room_slug, "#01DF01", "", "bold"); } } break; case "vunmute": if (!sArg) { cb.sendNotice("No user name supplied", cb.room_slug, "#FF8000", "", "bold"); return msg; } else { if (index != -1) { silenced.splice(index, 1); cb.log(silenced); cb.sendNotice(sArg + " is unsilenced, their messages won't show in chat. /vsilence " + sArg + " to redo.", cb.room_slug, "#01DF01", "", "bold"); } else { cb.sendNotice(sArg + " was not found in the silenced users.", cb.room_slug, "#01DF01", "", "bold"); } } break; default: //not our command, pass it on return msg; break; } } return; } if (silenced.includes(msg['user'].toLowerCase())) { msg['X-Spam'] = true; } txt = txt.replace(/\bher\b/gi, 'him'); txt = txt.replace(/\bshe\b/gi, 'he'); txt = txt.replace(/pussy/gi, 'harbl'); txt = txt.replace(/tits|boobs/gi, 'chest'); txt = txt.replace(/godess|goddess/gi, 'God'); txt = txt.replace(/princess/gi, 'Prince'); txt = txt.replace(/queen/gi, 'King'); txt = txt.replace(/girl/gi, 'boy'); txt = txt.replace(/woman/gi, 'man'); txt = txt.replace(/wife/gi, 'husband'); txt = txt.replace(/bitch/gi, 'chucklehead'); txt = txt.replace(/whore/gi, 'manwhore'); txt = txt.replace(/slut/gi, 'manslut'); msg['m'] = txt; return msg; }); function init () { var users = "" + cb.settings.shhh; users = users.split(','); for (var user of users) { silenced.push(user.trim().toLowerCase()); } } init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.