Bots Home
|
Create an App
fucking CB
Author:
polymathcs
Description
Source Code
Launch Bot
Current Users
Created by:
Polymathcs
/* * Created by kyle on 3/09/17. * working kind of */ var _AppName = 'SnapChat'; cb.settings_choices = [ {name: 'SnapCost', label: 'How much does your Snap Cost?', type: 'int', defaultValue: '300', required: true}, {name: 'CheckTipNote', label: 'Check the tip note for username?', type: 'str', defaultValue: 'Yes', required: false}, {name: 'SnapchatRules', label: 'What are the Rules for your Snapchat?', type: 'str', defaultValue: 'You are Allowed to Screen Shot, Chat, do not send inappropriet pictures!', required: false}, {name: 'SnapThankYou', label: 'Would you like to send a thank you?', type: 'str', defaultValue: 'Please one token tip note your Snapchat Name with Snap in the beggining then your name. Like "Snap yourname"', required: false}, //notice {name: 'notice1', label: 'Notice', type: 'str', defaultValue: '', required: true}, {name: 'notice2', label: 'Notice', type: 'str', defaultValue: '', required: true}, {name: 'notice3', label: 'Notice', type: 'str', defaultValue: '', required: true}, {name: 'notice4', label: 'Notice', type: 'str', defaultValue: '', required: true}, {name: 'notice5', label: 'Notice', type: 'str', defaultValue: '', required: true} ]; // variables var snapCost = parseInt(cb.settings.SnapCost); // Broadcaster var BC = cb.room_slug; //these are the attributes that have to do with sending messages var msg = ""; var user = ""; var tipUser = ""; var bgColor = "#ffffff"; var fontColor = "#000000"; var group = ""; var SCBought = []; var snapchatUsers = []; function sendMsg(msg, user, bgColor, fontColor, group) { cb.sendNotice(msg, user, bgColor, fontColor, ''); } function noticeArray() { // if(cb.settings) var noticeMsg = cb.settings['notice1'] sendMsg(noticeMsg, '',bgColor,fontColor, ''); } cb.onEnter(function() { noticeArray(); }); cb.onTip(function(tip) { //variables assingening tipUser = tip.from_user; msg = tip.message; var amount = parseInt(tip.amount); var gender = tip.gender; var messageArray = []; switch (amount) { case snapCost: bgColor = '#ffff00'; sendMsg('Thank you '+tipUser+' for buying my SnapChat please send me a 1 token tip note with \"Snap name \" than enter your Snapchat username', tipUser, '#ff0000', '#000000', '',''); //sendMsg(tip.message, '', '#ffff00', '#000000', '','' ); // was for debuging sendMsg('what is the type ' + typeof msg, '', '#ffff00', '#000000', '' ); sendMsg(SCRules, tipUser, '','',''); SCBought.push(tipUser); sendMsg(SCBought, tipUser, '', '', ''); break; case 20: bgColor = "#0000ff"; //sendMsg('do you hate me is that why you spanked me?', tipUser, bgColor, fontColor, ''); //sendMsg('I guess I need to spank my ass', '', 'bgColor', '#000000', ''); break; case 1: sendMsg(msg, '', '#ffff00', '#000000', '','' ); sendMsg(msg.startsWith("snap"), '', '#ffff00', '#000000', '','' ); if (msg.startsWith("snap")) { this.messageArray = msg.toString().split(' '); var snapName = this.messageArray[1]; snapchatUsers.push(snapName); sendMsg('Hello' + snapName, '', '#ffff00', '#000000', '','' ); } break default: } }); cb.onMessage(function(msg) { msgUser = msg.user; msgMessage = msg.m.trim(); }); function init() { var SCThankyou = cb.settings.SnapThankYou; var SCRules = cb.settings.SnapchatRules; noticeArray(); }; init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.