Apps Home
|
Create an App
dova-apps
Author:
dovakeidy
Description
Source Code
Launch App
Current Users
Created by:
Dovakeidy
cb.settings_choices = [ { name: 'banned_words', type: 'str', minLength: 1, maxLength: 30, label:"Type your banned words separate by a comma !" }, { name: 'silenced_duration', type: 'int', minValue:1, maxValue:600, label:"Amount of silenced time (in second)" }, ]; var bannedWords = (cb.settings.banned_words !== undefined ? cb.settings.banned_words.split(",") : []); var commands = ["silence","unSilence","showSilenced","addBanWord","removeBanWord"]; var silencedUsers = []; var users = []; // silence, unSilence, showSilenced, addBanWord,removeBanWord function Command() { this.user = user; this.command = command; } function User(user,has_tokens,tip) { this.user = user; this.has_tokens = has_tokens; this.tipped_recently = tipped_recently this.is_silence = false; this.silenced_date = null; this.total_tip = tip || 0; } cb.onMessage(function (message) { if (message['user'] == cb.room_slug && message.m.charAt(0) === '/') { commands.forEach((command) => { if (message.m.includes(command)) { adminMessage(command, message); message['X-Spam'] = true; return message; } else { cb.sendNotice("This command doesn't exist or isnt well typed !",cb.room_slug,"#f44242"); return 0; } }); } else { regular(message); } });
© Copyright Chaturbate 2011- 2025. All Rights Reserved.