Bots Home
|
Create an App
Tools for Moderators
Author:
fiveflessfast
Description
Source Code
Launch Bot
Current Users
Created by:
Fiveflessfast
cb.onMessage(function(msg) { if (quality(msg) < 10) { msg['X-Spam'] = true; request_tokens(msg); } else { return msg; } }); function black_list_phrases() { var pA = cb.settings.flagged_words.split(',').map(x=>{ return x.replace('.', ''); } ); var pB = cb.settings.flagged_words_list_b.split(',').map(x=>{ return x.replace('.', ''); } ); return pA.concat(pB) } function request_tokens(msg) { var q = quality(msg); cb.sendNotice('Msg requires tip before the model reads it. Tip ' + q + ' tokens and include message in tip note.', msg['user'],'#ff0000','#ffffff','bold',''); } function quality(msg) { var score = 10 , flags = 0 , tokens = msg['m'].split(' ') , p = black_list_phrases(); tokens.forEach((w,k)=>{ flags = p.includes(w) ? ++flags : flags; } ); p.forEach((w,k)=>{ flags = msg['m'].includes(w) ? ++flags : flags; }) score = score - flags return Math.abs(score); } ; /* black list settings */ cb.settings_choices = [ {name:'flagged_words', type:'str', minLength:1, maxLength:9999, defaultValue:'stupid,hate you,retard,dumbass,add more phrases...', label: "Words and phrases delimited by a comma."}, {name:'flagged_words_list_b', type:'str', minLength:1, maxLength:9999, defaultValue:'Add words...', label: "Second place to list flagged phrases. This is good for a short list of temporarily banned phrases."} ]; /* Tip Menu */ function TM(s) { var items = s.menu_items //items = items.split(',').join(s.dl) var init = function(){ sendNotice(items) } var sendNotice = function(msg){ cb.sendNotice(msg,'','#fff',cb.settings.color,'bolder') cb.setTimeout(x=>sendNotice(x),cb.settings.interval*1000,msg) } init() } TM(cb.settings) cb.settings_choices = [ {name:'menu_items',type:'str',minLength:1,maxLength:2222,defaultValue:'pm(25),wiggle toes(35),kiss(20),tell a story(55)',label:'Tip menu items with price. Items are seperated by a comma.'}, {name:'dl',type:'str',minLength:1,maxLength:2222,defaultValue:':pixelheart',label:'Emoji or word to separate each menu item.'}, {name:'color',type:'str',minLength:1,maxLength:2222,defaultValue:'#803679',label:'Color code for notice message. Search online for "color picker", which gives you color codes.'}, {name:'interval',type:'str',minLength:1,maxLength:2222,defaultValue:'90',label:'The time interval of the tip menu notice. Number is in seconds.'} ].concat(cb.settings_choices)
© Copyright Chaturbate 2011- 2024. All Rights Reserved.