Apps Home
|
Create an App
tok ratecock
Author:
tok124
Description
Source Code
Launch App
Current Users
Created by:
Tok124
let ratings = []; cb.settings_choices = [ {name: 'bodypart', label:'Allow users to rate my', type:'choice', choice1:'Cock', choice2:'Pussy', choice3:'Ass', choice4:'boobs'} ]; let bodypart = cb.settings.bodypart; cb.onEnter(user => { let msg = "Welcome to my room "+user.user+". i am currently running the bot \"Rate my Bodypart\"."; msg += "This bot has been developed by tok124"; msg += "I hope you enjoy my room and that you like my "+bodypart.toLowerCase()+", I appreciate it very much if you could rate my "+bodypart.toLowerCase()+".\n"; msg += "minimum rate is 0 and max rate is 10\n"; msg += "To rate the "+bodypart.toLowerCase()+" please write example \"/rate 5\" to give a 5/10 rating."; cb.sendNotice(msg, user.user, "#000000", "#FFFFFF", "bold"); }); cb.onStart(user => { cb.sendNotice(cb.room_slug+" has started Rate my Bodypart Bot. This bot has been developed by Tok124. Thank you for using my bot !", "", "#000000", "#FFFFFF", "bold"); }); cb.onMessage(msg => { let message = msg.m.split(" "); if(message[0].charAt(0) == "/") { msg['X-Spam'] = true; switch(message[0]) { case"/rate": let rating = parseInt(message[1]); if(rating >= 0 && rating <= 10) { var ratearray = {name: msg.user, rating: rating}; var userExist = false; for (let i=0; i < ratings.length; i++) { if (ratings[i].name == msg.user){ cb.sendNotice("You have already given me your rating. Your rating cannot be changed", msg.user, "#000000", "#FFFFFF", "bold"); userExist = true; break; } } if (!userExist) { if(rating <= 3) { cb.sendNotice(msg.user+" has given me a "+bodypart.toLowerCase()+" rating of "+rating+"/10. Sorry to hear you don't like :(", "", "#000000", "#FFFFFF", "bold"); }else if(rating > 3 && rating <= 7) { cb.sendNotice(msg.user+" has given me a "+bodypart.toLowerCase()+" rating of "+rating+"/10. Thank you for your rating !", "", "#000000", "#FFFFFF", "bold"); }else if(rating > 7 && rating <= 10) { cb.sendNotice(msg.user+" has given me a "+bodypart.toLowerCase()+" rating of "+rating+"/10. WoW ! I am very happy for this rating :)", "", "#000000", "#FFFFFF", "bold"); } ratings.push(ratearray); } }else if(rating > 10 || rating < 0) { cb.sendNotice("You can only give a rating between 0 and 10.", msg.user, "#000000", "#FFFFFF", "bold") } break; default: break; } } if (ratings.length != 0) { for(let i = 0; i < ratings.length; i++) { if(msg.user == ratings[i].name) { msg.m = "[rated "+ratings[i].rating+"/10] "+msg.m; } } } });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.