Apps Home
|
Create an App
Spender-Only Chat Bot
Author:
colbycums
Description
Source Code
Launch App
Current Users
Created by:
Colbycums
// Set minimum tokens manually const MIN_TOKENS = 15; // List of users who have tipped enough let spenderList = new Set(); // When someone tips, add them to the list if they tip enough cb.onTip(function (tip) { if (tip.amount >= MIN_TOKENS) { spenderList.add(tip.from_user); cb.sendNotice("Thanks " + tip.from_user + "! You can now chat.", tip.from_user); } }); // When someone sends a message, check if they're a spender cb.onMessage(function (msg) { if (spenderList.has(msg.user)) { return msg; // Allow message } else { cb.sendNotice("Only users who have tipped at least " + MIN_TOKENS + " tokens can chat. Tip to join!", msg.user); return false; // Block message } });
© Copyright Chaturbate 2011- 2026. All Rights Reserved.