Bots Home
|
Create an App
CensorBot
Author:
yolo
Description
Source Code
Launch Bot
Current Users
Created by:
Yolo
cb.settings_choices = [ {name:'palabras_prohibidas', type:'str', minLength:1, maxLength:599, label: "Palabras Prohibidas (Separar cada palabra con un espacio)"}, {name:'remplazos', type:'str', minLength:1, maxLength:599, defaultValue: "Bad Word!", label: "Remplazar con (Separa cada frase o palabra con un guiĆ³n -):"} ]; cb.onMessage(function (message) { message.m = message.m.toLowerCase(); string_to_array = function (str) { return str.trim().split(" "); }; string_to_array2 = function (str) { return str.trim().split("-"); }; palabras = string_to_array(cb.settings.palabras_prohibidas); remplazos = string_to_array2(cb.settings.remplazos); for(i = 0; i<palabras.length; i++){ if(message.m.indexOf(palabras[i]) >= 0){ message['m'] = remplazos[i]; } } });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.