Bots Home
|
Create an App
Dreamland Safezone
Author:
dlqueen
Description
Source Code
Launch Bot
Current Users
Created by:
Dlqueen
var yes = "yes"; var no = "no"; var muted_users = []; var mask = /(My pussy is cumming)|(Check out my Room)|(\. club)|(c\w*2\w*c)/gi; cb.settings_choices = [ { name: "muted_users", label: "Muted Users", type: "str", minLength: 1, maxLength: 1024, defaultValue: "", required: false }, { name: "show_notifications", label: "Show Notifications", type: "choice", choice1: yes, choice2: no, defaultValue: yes } ]; function sendNoticeToEveryone(message) { sendNoticeToUser(message, null); } function sendNoticeToBroadcaster(message) { sendNoticeToUser(message, cb.room_slug); } function sendNoticeToUser(message, username) { cb.sendNotice(message, username, "#ffffff", "#000080", "bold"); } function help() { cb.sendNotice( "Use \"/help\" to show this help\n" + "Use \"/bans\" to show muted users\n", cb.room_slug, "#ffffff", "#008000", "bold"); } function init() { if (cb.settings == null || cb.settings.muted_users == null) { return; } muted_users = cb.settings.muted_users.split(","); } cb.onMessage(function (msg) { var message = msg.m.trim(); if (cb.room_slug == msg.user) { if (message == "/bans") { sendNoticeToBroadcaster("Muted users: " + muted_users.join(",")); msg["X-Spam"] = true; return msg; } if (message == "/help") { help(); msg["X-Spam"] = true; return msg; } } var isGray = !msg.has_tokens && !msg.is_mod && !msg.in_fanclub && !msg.tipped_recently && !msg.tipped_alot_recently && !msg.tipped_tons_recently; isGray = true; if (isGray) { var isSpam = muted_users.includes(msg.user); if (!isSpam && message.match(mask)) { isSpam = true; muted_users.push(msg.user); if (cb.settings.show_notifications == yes) { sendNoticeToBroadcaster("User " + msg.user + " has been muted."); } } if (isSpam) { msg["X-Spam"] = true; } } return msg; }); help(); init();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.