Bots Home
|
Create an App
CensorBot For Ana by
Author:
futurexco
Description
Source Code
Launch Bot
Current Users
Created by:
Futurexco
/** Autor: Marp22 Modificado: Future **/ 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) { 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.toLowerCase()); remplazos = string_to_array2(cb.settings.remplazos); mensajeA = string_to_array(message.m.toLowerCase()); for (i = 0; i < palabras.length; i++) { for(j=0;j <mensajeA.length;j++){ if(mensajeA[j] == palabras[i]){ message['m'] = remplazos[Math.floor(Math.random() *(remplazos.length - 1))]; } } } });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.