Apps Home
|
Create an App
testapp7777777
Author:
thenakedtruthcc
Description
Source Code
Launch App
Current Users
Created by:
Thenakedtruthcc
/* Title: "Testing" Author: thenakedtruthcc Version: 1.0.0 (01/19/21) */ cb.settings_choices = [{ name: 'tipMenuItem1', type: 'str', defaultValue: 'Flash Tits', label: "Tip Menu Item 1" },{ name: 'tipMenuTokens1', type: 'int', minValue: 0, defaultValue: 0, label: "Tip Menu Item 1 Tokens" } ] cb.onEnter(function(user) { cb.chatNotice('Welcome ' + user['user'] + '!'); }); cb.onStart(user => { cb.chatNotice("Welcome broadcaster!! Type \"!!help\" for a list of functions.", cb.room_slug,'','#4334eb', 'bold') }) var pollStart = false; var pollQuestion = ""; var pollAnswers = []; cb.onMessage(function (msg) { /* !!help command */ if(msg['user'] == cb.room_slug && msg['m'] == '!!help'){ cb.chatNotice("List of functions exclusively available to you, the broadcaster:", cb.room_slug,'','#4334eb', 'bold'); cb.chatNotice("!!startPoll --- Start a new poll", cb.room_slug,'','#4334eb', 'bold') msg['X-Spam'] = true; msg['m'] = msg['m'] + ' (This command and text is only visible to you.)'; return msg; } /* !!startPoll */ else if(msg['user'] == cb.room_slug && msg['m'] == '!!startPoll'){ cb.chatNotice("Please enter the question you want to ask in your poll.", cb.room_slug,'','#4334eb', 'bold'); pollStart = true; msg['X-Spam'] = true; msg['m'] = msg['m'] + ' (This command and text is only visible to you.)'; return msg; } else if(msg['user'] == cb.room_slug && pollStart == true){ cb.chatNotice("Please enter possible answer number 1 (Maximum 10 answers allowed.)", cb.room_slug,'','#4334eb', 'bold'); pollStart = false; pollQuestion = msg['m']; msg['X-Spam'] = true; msg['m'] = msg['m'] + ' (This command is only visible to you.)'; return msg; } else if(msg['user'] == cb.room_slug && pollStart == false && pollQuestion !== ""){ var pollAnswerCount = Object.keys(pollAnswers).length; if(pollAnswerCount >= 8){ cb.chatNotice("You've reached the maximum amount of answers, please enter \"!!start\" to start the poll or \"!!cancel\" to cancel the poll."+(pollAnswerCount+2)+".", cb.room_slug,'','#4334eb', 'bold'); } else { if(pollAnswerCount == 0) cb.chatNotice("Please enter possible answer number "+(pollAnswerCount+2)+".", cb.room_slug,'','#4334eb', 'bold'); else cb.chatNotice("Please enter possible answer number "+(pollAnswerCount+2)+", or enter \"!!start\" to start the poll or \"!!cancel\" to cancel the poll.", cb.room_slug,'','#4334eb', 'bold'); pollStart = false; pollAnswers[pollAnswerCount] = msg['m']; } msg['X-Spam'] = true; msg['m'] = msg['m'] + ' (This command is only visible to you.)'; return msg; } });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.