Bots Home
|
Create an App
abcomBot
Author:
fredda1
Description
Source Code
Launch Bot
Current Users
Created by:
Fredda1
function update(act,u) { const omi = u.mi; u.mi = omi && ""+(+omi+1) || "0"; cb.sendNotice(act+" set mi from "+omi+" to "+u.mi+"."); }; var g = this; function send(o,n="!") { cb.sendNotice(n+" = "+ (o?o.toString().replace(/\n/g,"\r").replace(/\r\r/g,"\r"):"-:-:-")); } function dump(o,n="?") { cb.sendNotice("------------------ "+n+" = "+o.toString()); for (const p in o) send(o[p], n+"."+p); }; function fump(f,n) { if (!n) n = f.name; cb.sendNotice("========================= "+n+" = "+f); for (const p in f) send(f[p], n+"."+p); }; if (!cb.slot) { cb.sendNotice("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); // dump(cb,"cb"); dump(cbjs,"cbjs"); dump(obj,"obj"); // dump(g,"glob"); } // cb.onStart (usr => update("onStart",usr)); update("CBJS1",cbjs); update("CBJS2",cbjs); function onMsg() { fump(onMsg.caller.caller.caller); cb.sendNotice(onMsg.caller.caller.caller.name); }; function onInit() { fump(onInit.caller,onInit.caller.name); // cb.sendNotice(onMsg.caller.caller.caller.name); }; // onInit(); // cb.onMessage(onMsg); cb.onMessage(m => { cb.sendNotice("receiving msg"); let l = Object.assign({}, m); if (!l.mi) l.mi = "9"; update("onMsg",l); cb.sendNotice("returning msg"); // cb.sendNotice(cb.onMessage.toString().replace(/\n/g,"\r")); return l; });
© Copyright Chaturbate 2011- 2025. All Rights Reserved.