Bots Home
|
Create an App
Gift of Song
Author:
kyle111111
Description
Source Code
Launch Bot
Current Users
Created by:
Kyle111111
/* Title: Whose Saying What? Author: Kyle111111 (at Chaturbate) Version: 0.1 (07/17/2017) Cost: If you like this, please donate a Tip to the author. Anything is greatly appreciated. If you use this regularly, please Tip at least 1 Token per day that you use this. (If you have more than 200 users in your room, please consider more than a 1 Token Tip.) (Free to tyleramerica) *** IN DEVELOPMENT *** Description: A bot to enable whispering, and programaticaly silence users. //TODO: Gift of Whisper. //TODO: ADD GIFT OF WHISPER FOR A PRICE //TODO: Can do farm animals, too. or random mass to all -- GO FARM WILD ! //TODO: Reply function by whispering //TODO: Use info / quick keys. */ var Voices = {}; var WHISPER_BACKGROUND = '#ADDFFF'; //#FFFF00 - yellow; #95B9C7 - baby blue; #ADDFFF - light blue cb.onTip(function(tip) { }); cb.onMessage(function(msg) { var iPowerUser = false; if (cb.room_slug === msg['user']) { iPowerUser = true; } else if (msg['is_mod']) { iPowerUser = true; } else if (msg['user'] === 'kyle111111') { iPowerUser = true; } if (iPowerUser) { if (msg['m'].match(/\/wwhelp/i)) { msg['X-Spam'] = true; cb.sendNotice('COMMANDS: wwHelp wwBark wwSong', msg['user']); } else if (msg['m'].match(/\/wwbark/i)) { msg['X-Spam'] = true; var splitM = msg['m'].split(' '); var sUser = splitM[1]; if (Voices.hasOwnProperty(sUser)) { Voices[sUser].ImNum += 3; } else { //new Voices var voice = {}; voice.ImNum = 3; voice.ImResponse = '... bark ... bark ... bark ...'; Voices[sUser] = voice; } cb.sendNotice('Voice changed for ' + sUser + '.', msg['user']); } else if (msg['m'].match(/\/wwsong/i)) { msg['X-Spam'] = true; var splitM = msg['m'].split(' '); var sUser = splitM[1]; if (Voices.hasOwnProperty(sUser)) { Voices[sUser].ImNum += 5; } else { //new Voices var voice = {}; voice.ImNum = 5; voice.ImResponse = '... la ... la ... la ...'; Voices[sUser] = voice; } cb.sendNotice('Voice changed for ' + sUser + '.', msg['user']); } } else { //if (iPowerUser) { var sUser = msg['user']; if (Voices.hasOwnProperty(sUser)) { if (Voices[sUser].ImNum > 0) { Voices[sUser].ImNum = Voices[sUser].ImNum - 1; var sMsg = msg['m']; msg['m'] = Voices[sUser].ImResponse + '(' + Voices[sUser].ImNum + ' left)'; cb.sendNotice('(' + sUser + ') ' + sMsg, cb.room_slug, WHISPER_BACKGROUND, '#000000', 'normal', 'red'); cb.sendNotice('(' + sUser + ') ' + sMsg, cb.room_slug, WHISPER_BACKGROUND); } } } // else of //if (iPowerUser) { }); function init() {} init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.