Bots Home
|
Create an App
Jex's Tip Timer
Author:
jex314
Description
Source Code
Launch Bot
Current Users
Created by:
Jex314
// Chaturbate App: Tip Timer Shutdown Reminder // Description: Adds 60 seconds to a countdown timer for every tip. Sends a message when timer ends. let timerDuration = 300; // Initial time in seconds (5 minutes for example) let remainingTime = timerDuration; let intervalId = null; let secondsPerTk = 5; // Desired rate of tipping to continue timer, in seconds per token let addedTime = 0; let messageSpan = " "; function startTimer() { if (intervalId !== null) return; // Prevent multiple intervals intervalId = setInterval(() => { remainingTime--; if (remainingTime <= 0) { clearInterval(intervalId); intervalId = null; cb.sendNotice("⏰ Timer ended! Please end the stream manually."); // Note: Apps cannot auto-end a stream; model must do it manually. } else if (remainingTime % 60 === 0) { cb.sendNotice("⏳ Time remaining: " + (remainingTime / 60) + " minute(s)."); } }, 1000); // Update every second } cb.onTip(function(tip) { addedTime = secondsPerTk * parseInt(tip["amount"]); remainingTime += addedTime; messageSpan = toString(Math.floor(addedTime / 60)) + ":" + toString(addedTime % 60); cb.sendNotice("Thanks, " + tip.from_user + "! " + messageSpan + " added. Total: " + toString(Math.floor(remainingTime / 60)) + ":" + toString(remainingTime % 60) + "."); startTimer(); }); cb.onEnter(function(user) { if (cb.room_slug === user.username) { cb.sendNotice("⏱️ Tip timer started. Tips add time at a rate of " + toString(secondsPerTk) + " seconds per token. Stream ends when timer runs out."); startTimer(); } }); // Optional: Configure panel settings cb.settings_choices = [];
© Copyright Chaturbate 2011- 2026. All Rights Reserved.