Bots Home
|
Create an App
sgsgsgsgsgsgsdgsxg3
Author:
eddietest1
Description
Source Code
Launch Bot
Current Users
Created by:
Eddietest1
var tipArray = []; function tipArraySort() { tipArray.sort(function(a, b) { return b.amount - a.amount; }) } function addtip(user, amount) { var found = -1; for (var i=0; i<tipArray.length; i+=1) if (tipArray[i].user === user) { tipArray[i].amount += amount; found = 1; tipArraySort(); break; } if (found < 0) { tipArray.push({user: user, amount: amount}); tipArraySort(); } } cb.onMessage(function(message) { if (message.m == 'show') { cb.sendNotice(tipArray, cb.room_slug); message['X-Spam'] = true; } }); cb.onTip(function(tip) { addtip(tip.from_user, tip.amount); });
© Copyright Chaturbate 2011- 2024. All Rights Reserved.