Bots Home
|
Create an App
DariaTeam
Author:
omniseeker
Description
Source Code
Launch Bot
Current Users
Created by:
Omniseeker
/* Title: Daria Team bot Author: Omniseeker Version: 2.1 (3/7/2018) This bot adds “DariaTeam” icons preceding the text of any member of the Daria Team. V2.1 Added custom icon overrides 3/7/2018 V1.1 Added cb.settings 3/6/2018 V1.0 Initial release 3/5/2018 */ cb.settings_choices = [ {name:'icon', type:'str', label:'Default icon to Use', defaultValue: ':DariaTeam2'}, {name:'user1', type:'str', required: false, label:'Team Member 1',}, {name:'icon1', type:'str', required: false, label:'Team Override 1',}, {name:'user2', type:'str', required: false, label:'Team Member 2',}, {name:'icon2', type:'str', required: false, label:'Team Override 2',}, {name:'user3', type:'str', required: false, label:'Team Member 3',}, {name:'icon3', type:'str', required: false, label:'Team Override 3',}, {name:'user4', type:'str', required: false, label:'Team Member 4',}, {name:'icon4', type:'str', required: false, label:'Team Override 4',}, {name:'user5', type:'str', required: false, label:'Team Member 5',}, {name:'icon5', type:'str', required: false, label:'Team Override 5',}, {name:'user6', type:'str', required: false, label:'Team Member 6',}, {name:'icon6', type:'str', required: false, label:'Team Override 6',}, {name:'user7', type:'str', required: false, label:'Team Member 7',}, {name:'icon7', type:'str', required: false, label:'Team Override 7',}, {name:'user8', type:'str', required: false, label:'Team Member 8',}, {name:'icon8', type:'str', required: false, label:'Team Override 8',}, {name:'user9', type:'str', required: false, label:'Team Member 9',}, {name:'icon9', type:'str', required: false, label:'Team Override 9',}, {name:'user10', type:'str', required: false, label:'Team Member 10',}, {name:'icon10', type:'str', required: false, label:'Team Override 10',} ]; var MAXTEAM = 10; cb.onMessage(function (msg) { var i = 0; var isTeam = false; while (!isTeam && i < MAXTEAM) { isTeam = (msg['user'] == cb.settings[‘user’ + (i+1)]); if (!isTeam) i++; } var strTeam = (cb.settings[‘icon’ + (i+1)] == 0) ? cb.settings.icon : cb.settings[‘icon’ + (i+1)]; var strMsg = msg["m"]; var isSpecial = strMsg.indexOf("/") == 0 || strMsg.indexOf("!") == 0 || strMsg.indexOf("#") == 0; if (isTeam && !isSpecial) { msg["m"] = strTeam + “ “ + strMsg; } return msg; });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.