Bots Home
|
Create an App
Test icon
Author:
fiveflessfast
Description
Source Code
Launch Bot
Current Users
Created by:
Fiveflessfast
cb.onMessage(hmsg) cb.onTip(htip) make_choices() var emoji = { 'bats': cb.settings.bats_emoji, 'ghost': cb.settings.ghost_emoji, 'candy': cb.settings.candy_emoji } function make_choices(a) { cb.settings_choices = [{ "name": 'bats', "type": 'str', "label": 'fans of bats', "required": false, minLength: 0, maxLength: 10240, "defaultValue": a }, { "name": 'ghost', "type": 'str', "label": 'fans of ghost', "required": false, minLength: 0, maxLength: 10240, "defaultValue": '' }, { "name": 'candy', "type": 'str', "label": 'fans of candy', "required": false, minLength: 0, maxLength: 10240, "defaultValue": '' }, { "name": 'bats_emoji', "type": 'str', "label": 'emoji for bats' }, { "name": 'ghost_emoji', "type": 'str', "label": 'emoji for ghost' }, { "name": 'candy_emoji', "type": 'str', "label": 'emoji for candy' }] } function htip(t) { var amt = parseInt(t['amount']) if (amt === 42) { cb.settings.bats += ',' + t['from_user'] } else if (amt === 40) { cb.settings.candy += ',' + t['from_user'] } else if (amt === 44) { cb.settings.ghost += ',' + t['from_user'] } make_choices(t['from_user']) } function hmsg(m) { return format_msg(m) } function format_msg(m) { Object.keys(emoji).forEach(function(g) { if (cb.settings[g].indexOf(m.user) !== -1) { m.m = emoji[g] + ' ' + m.m } }) return m }
© Copyright Chaturbate 2011- 2024. All Rights Reserved.