Bots Home
|
Create an App
lrapp
Author:
devel
Description
Source Code
Launch Bot
Current Users
Created by:
Devel
const definableTipMenuOptions = 20; let tipMenuFields = new Array(); for(let i=1; i<=definableTipMenuOptions; i++) { let optField = { label: 'Tip Menu Option #' + i, name: 'tmo' + i + 'text', type: 'str', minLength: 1, maxLength: 255, required: false } tipMenuFields.push(optField); optField = { label: 'Price for Option #' + i + ' price', name: 'tmo' + i + 'price', type: 'int', minValue: 1, maxValue: 99999, required: false } tipMenuFields.push(optField); } tipMenuFields.push({ label: 'Message to new follower', name: 'followMsg', type: 'str', minLength: 1, maxLength: 255, required: true }); tipMenuFields.push({ label: 'Message to new unfollower', name: 'unfollowMsg', type: 'str', minLength: 1, maxLength: 255, required: true }); cb.settings_choices = tipMenuFields; tipMenu = new Map(); for(let i=1; i<=definableTipMenuOptions; i++) { let tmoText = cb.settings['tmo' + i + 'text']; let tmoPrice = cb.settings['tmo' + i + 'price']; if(tmoText != '' && tmoPrice > 0 && tmoPrice < 100000 ) { tipMenu.set(tmoPrice, tmoText); } } var tipMenuCompiled = 'LushRelish TIP Menu:'; tipMenu.forEach((tmoText, tmoPrice) => { tipMenuCompiled += ' :heart7 ' + tmoText + ' (' + tmoPrice + ')'; }); cb.onMessage(function(msg) { if(msg['m'] == '/tipmenu') { printTipMenu(); } return msg; }); cb.onTip(function(tip) { if(tipMenu.has(tip['amount'])) { cb.sendNotice(tip['from_user'] + ' tipped for ' + tipMenu.get(tip['amount']), '', '#60c910', '#ffffff', 'bolder'); } }); function printTipMenu() { cb.chatNotice(tipMenuCompiled, '', '#60c910', '#ffffff', 'bolder'); } function autoPrintTipMenu() { printTipMenu(); cb.setTimeout(autoPrintTipMenu, 180000); } cb.setTimeout(autoPrintTipMenu, 180000); /* DEALING WITH FOLLOWERS */ cb.onFollow(user => { cb.sendNotice(user['user'] + ', thank you for following me! :muahhhhnoire', '', '#fe389b', '#ffffff', 'bolder'); cb.sendNotice(cb.settings.followMsg, user['user'], '#fe389b', '#ffffff', 'bolder'); }); /* DEALING WITH UNFOLLOWERS */ cb.onUnFollow(user => { cb.sendNotice(cb.settings.unfollowMsg + ' :sorrycat', user['user'], '#399cfe', '#ffffff', 'bolder'); });
© Copyright Chaturbate 2011- 2025. All Rights Reserved.