Bots Home
|
Create an App
historia
Author:
adriandev
Description
Source Code
Launch Bot
Current Users
Created by:
Adriandev
function sendToMember(message, member) { cb.sendNotice(message, member); } function sendToSelf(message) { cb.sendNotice(message, cb.room_slug); } function sendNotice(message, member = cb.room_slug) { cb.sendNotice(message, member); } var history = []; cb.onEnter(function(usr) { var m = usr['user']; var ts = String(Date.now()); if(history.includes(m)) { sendNotice('Member: ' + m + ' has been here before. Last tipped: ' + history[m]['tip_last'] + ' Total tipped: ' + history[m]['tip_total']); } else { history.push(m); history[m] = { tip_last: 0, tip_total: 0 }; sendNotice('Member: ' + m + ' is for the first time here'); } }); cb.onTip(function(tip) { var m = tip['from_user']; var a = parseInt(tip['amount']); history[m]['tip_last'] = a; history[m]['tip_total'] += a; }); cb.onMessage(function(msg) { });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.