Bots Home
|
Create an App
Planedit
Author:
planedit
Description
Source Code
Launch Bot
Current Users
Created by:
Planedit
/* Title: Silence Greys Temporarily bot Author: Planedit Version: 1.0 (6/26/2019) Silence all Greys for the first few minutes they are in your room. */ var autoBot = { silenced: { } }; autoBot.isSilenced = function (username) { "use strict"; return (username in this.silenced); }; autoBot.unSilenceUser = function (username) { "use strict"; if (this.isSilenced(username)) { delete this.silenced[username];; return true; } else { return false; } }; autoBot.silenceUser = function (username) { "use strict"; if (this.isSilenced(username)) { return false; } else { this.silenced[username] = 1; return true; } }; cb.onEnter(function(user) { var isMod = msg['is_mod']; var isFan = msg['in_fanclub']; var isModel = msg['user'] == cb.room_slug; var hasTokens = msg['has_tokens']; var hasTipped = msg['tipped_recently']; var isGrey = !(hasTipped || hasTokens || isMod || isModel || isFan); if (isGrey) { autoBot.silenceUser(user); cb.setTimeout(autoBot.unSilenceUser, 3600000); } }); cb.onMessage(function (msg) { "use strict"; return autoBot.onMessage(msg); }); autoBot.onMessage = function (msg) { var u = msg.user; if (this.isSilenced(u)) { msg['X-Spam'] = true; msg['m'] = "**Chat silenced**"; cb.chatNotice("Sorry, you'll have to wait or tip before you can write messages",msg['user'],'','','bold'); } return msg; };
© Copyright Chaturbate 2011- 2025. All Rights Reserved.