Bots Home
|
Create an App
Kick Anonymous
Author:
justheretoread
Description
Source Code
Launch Bot
Current Users
Created by:
Justheretoread
// Code goes here var app = {}; var limitCam_users = []; app.initialize = function() { app.initOnMessage(); app.initOnEnter(); app.initOnTip(); app.initCommands(); }; app.log = function(msg) { cb.log(msg); }; app.initCommands = function() { app.commands = { '/start': app.startApp, '/stop': app.stopApp, } }; app.startApp = function() { var usersWithAccess = cb.limitCam_allUsersWithAccess(); cb.limitCam_start("Cam is closed for a special show. Speak to join!", usersWithAccess); app.log("Cam is closed"); }; app.stopApp = function() { cb.limitCam_stop(); app.log("Cam is open"); }; app.isOwner = function(user) { return cb.room_slug == user; }; app.limitCam_addUsers = function(user) { if (limitCam_users.indexOf(user) == -1) { cb.limitCam_addUsers([user]); limitCam_users.push(user); } } app.initOnEnter = function() { cb.onEnter(function(user) { app.limitCam_addUsers(arrivee.user); }); }; app.initOnTip = function() { cb.onTip(function(tipper) { app.limitCam_addUsers(tipper.user); }); }; app.initOnMessage = function() { cb.onMessage(function(message) { /** * access commands * **/ if (app.isOwner(message.user)) { if (!!app.commands[message.m]) { app.commands[message.m](); message['X-Spam'] = true; } } app.limitCam_addUsers(message.user); return message; }); } app.initialize();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.