Bots Home
|
Create an App
SA Tip Menu
Author:
satest1
Description
Source Code
Launch Bot
Current Users
Created by:
Satest1
/* Title: "Tip Menu" bot based on the original idea of badbadbubba. Additional changes by 4science You can now use your own divider! Simply pick 'Custom' in the drop-down menu and write whatever you want! Even gif! Does this need more exclamation point? I believe so! You can now run a sale, reducing all the price on the menu by X%. Added the option to add or delete options on the menu. You can now toggle on and off a notice when someone request the menu (it currently hides that.) ----Contact---- Send complains, suggestions, bug reports and praises to the4science@gmail.com or on twitter @the4science. If you want a faster answer, use twitter. */ cb.settings_choices = [{ name: 'sepchar', type: 'choice', choice1: 'Vertical Bar', choice2: 'Hearts', choice3: 'Glitter', choice4: 'Flowers', choice5: 'Bow', choice6: 'Hearts2', choice7: 'Smiley', choice8: 'Text Heart', choice9: 'Text Diamond', choice10: 'Text Star', choice11: 'Custom', defaultValue: 'Vertical Bar', label: "Separator character" }, { name: 'sepcharcustom', type: 'str', defaultValue: ':heart2', required: false, label: 'Custom Separator. It can be an gif (Don\'t forget the ":") or a string of characters (&!&).' }, { name: 'menutxtcolor1', type: 'str', label: 'Text color (default red...ish #F10060)', required: false, defaultValue: '#F10060' }, { name: 'menubgcolor1', type: 'str', label: 'Background color (default white #FFFFFF)', required: false, defaultValue: '#FFFFFF' }, { name: 'chatAd', type: 'str', defaultValue: 3, label: 'How often the menu (or each part) will appear in chat. Can do fractions, e.g. 2.5 = two minutes 30 seconds.' }, { name: 'chatNotice', type: 'choice', choice1: 'Display the full menu', choice2: 'Only display the short notice', defaultValue: 'Display the full menu', label: "Do you want the notice to display the full menu or only the short notice ( ei: Type '/tipmenu' to see the menu)" }, { name: 'listSort', type: 'choice', choice1: 'Do not sort the list', choice2: 'Ascending', choice3: 'Descending', defaultValue: 'Ascending', label: "Do you want the list to be sorted by price?" }, { name: 'listSplit', type: 'choice', choice1: 'Do not split the list', choice2: 'Split the list in 2', defaultValue: 'Do not split the list', label: "If you have a very long list, Do you want the list to be split in 2?" }, { name: 'menutxtcolor2', type: 'str', required: false, label: 'You can pick the color for the split menu', defaultValue: '#F10060' }, { name: 'menubgcolor2', type: 'str', required: false, label: 'Split menu background color', defaultValue: '#FFFFFF' }, { name: 'item1', type: 'str', label: "Item 1 " }, { name: 'itemprice1', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, label: 'Item 1 price' }, { name: 'item2', type: 'str', required: false, label: 'Item 2' }, { name: 'itemprice2', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 2 price' }, { name: 'item3', type: 'str', required: false, label: 'Item 3' }, { name: 'itemprice3', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 3 price' }, { name: 'item4', type: 'str', required: false, label: 'Item 4' }, { name: 'itemprice4', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 4 price' }, { name: 'item5', type: 'str', required: false, label: 'Item 5' }, { name: 'itemprice5', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 5 price' }, { name: 'item6', type: 'str', required: false, label: 'Item 6' }, { name: 'itemprice6', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 6 price' }, { name: 'item7', type: 'str', required: false, label: 'Item 7' }, { name: 'itemprice7', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 7 price' }, { name: 'item8', type: 'str', required: false, label: 'Item 8' }, { name: 'itemprice8', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 8 price' }, { name: 'item9', type: 'str', required: false, label: 'Item 9' }, { name: 'itemprice9', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 9 price' }, { name: 'item10', type: 'str', required: false, label: 'Item 10' }, { name: 'itemprice10', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 10 price' }, { name: 'item11', type: 'str', required: false, label: 'Item 11' }, { name: 'itemprice11', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 11 price' }, { name: 'item12', type: 'str', required: false, label: 'Item 12' }, { name: 'itemprice12', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 12 price' }, { name: 'item13', type: 'str', required: false, label: 'Item 13' }, { name: 'itemprice13', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 13 price' }, { name: 'item14', type: 'str', required: false, label: 'Item 14' }, { name: 'itemprice14', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 14 price' }, { name: 'item15', type: 'str', required: false, label: 'Item 15' }, { name: 'itemprice15', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 15 price' }, { name: 'item16', type: 'str', required: false, label: 'Item 16' }, { name: 'itemprice16', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 16 price' }, { name: 'item17', type: 'str', required: false, label: 'Item 17' }, { name: 'itemprice17', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 17 price' }, { name: 'item18', type: 'str', required: false, label: 'Item 18' }, { name: 'itemprice18', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 18 price' }, { name: 'item19', type: 'str', required: false, label: 'Item 19' }, { name: 'itemprice19', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 19 price' }, { name: 'item20', type: 'str', required: false, label: 'Item 20' }, { name: 'itemprice20', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 20 price' }, { name: 'item21', type: 'str', required: false, label: 'Item 21' }, { name: 'itemprice21', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 21 price' }, { name: 'item22', type: 'str', required: false, label: 'Item 22' }, { name: 'itemprice22', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 22 price' }, { name: 'item23', type: 'str', required: false, label: 'Item 23' }, { name: 'itemprice23', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 23 price' }, { name: 'item24', type: 'str', required: false, label: 'Item 24' }, { name: 'itemprice24', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 24 price' }, { name: 'item25', type: 'str', required: false, label: 'Item 25' }, { name: 'itemprice25', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 25 price' }, { name: 'item26', type: 'str', required: false, label: 'Item 26' }, { name: 'itemprice26', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 26 price' }, { name: 'item27', type: 'str', required: false, label: 'Item 27' }, { name: 'itemprice27', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 27 price' }, { name: 'item28', type: 'str', required: false, label: 'Item 28' }, { name: 'itemprice28', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 28 price' }, { name: 'item29', type: 'str', required: false, label: 'Item 29' }, { name: 'itemprice29', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 29 price' }, { name: 'item30', type: 'str', required: false, label: 'Item 30' }, { name: 'itemprice30', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 30 price' }, { name: 'item31', type: 'str', required: false, label: "Item 31 " }, { name: 'itemprice31', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 31 price' }, { name: 'item32', type: 'str', required: false, label: "Item 32 " }, { name: 'itemprice32', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 32 price' }, { name: 'item33', type: 'str', required: false, label: "Item 33 " }, { name: 'itemprice33', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 33 price' }, { name: 'item34', type: 'str', required: false, label: "Item 34 " }, { name: 'itemprice34', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 34 price' }, { name: 'item35', type: 'str', required: false, label: "Item 35 " }, { name: 'itemprice35', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 35 price' }, { name: 'item36', type: 'str', required: false, label: "Item 36 " }, { name: 'itemprice36', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 36 price' }, { name: 'item37', type: 'str', required: false, label: "Item 37 " }, { name: 'itemprice37', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 37 price' }, { name: 'item38', type: 'str', required: false, label: "Item 38 " }, { name: 'itemprice38', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 38 price' }, { name: 'item39', type: 'str', required: false, label: "Item 39 " }, { name: 'itemprice39', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 39 price' }, { name: 'item40', type: 'str', required: false, label: "Item 40 " }, { name: 'itemprice40', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 40 price' }, { name: 'item41', type: 'str', required: false, label: "Item 41 " }, { name: 'itemprice41', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 41 price' }, { name: 'item42', type: 'str', required: false, label: "Item 42 " }, { name: 'itemprice42', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 42 price' }, { name: 'item43', type: 'str', required: false, label: "Item 43 " }, { name: 'itemprice43', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 43 price' }, { name: 'item44', type: 'str', required: false, label: "Item 44 " }, { name: 'itemprice44', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 44 price' }, { name: 'item45', type: 'str', required: false, label: "Item 45 " }, { name: 'itemprice45', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 45 price' }, { name: 'item46', type: 'str', required: false, label: "Item 46 " }, { name: 'itemprice46', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 46 price' }, { name: 'item47', type: 'str', required: false, label: "Item 47 " }, { name: 'itemprice47', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 47 price' }, { name: 'item48', type: 'str', required: false, label: "Item 48 " }, { name: 'itemprice48', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 48 price' }, { name: 'item49', type: 'str', required: false, label: "Item 49 " }, { name: 'itemprice49', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 49 price' }, { name: 'item50', type: 'str', required: false, label: "Item 50 " }, { name: 'itemprice50', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 50 price' }, { name: 'item51', type: 'str', required: false, label: "Item 51 " }, { name: 'itemprice51', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 51 price' }, { name: 'item52', type: 'str', required: false, label: "Item 52 " }, { name: 'itemprice52', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 52 price' }, { name: 'item53', type: 'str', required: false, label: "Item 53 " }, { name: 'itemprice53', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 53 price' }, { name: 'item54', type: 'str', required: false, label: "Item 54 " }, { name: 'itemprice54', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 54 price' }, { name: 'item55', type: 'str', required: false, label: "Item 55 " }, { name: 'itemprice55', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 55 price' }, { name: 'item56', type: 'str', required: false, label: "Item 56 " }, { name: 'itemprice56', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 56 price' }, { name: 'item57', type: 'str', required: false, label: "Item 57 " }, { name: 'itemprice57', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 57 price' }, { name: 'item58', type: 'str', required: false, label: "Item 58 " }, { name: 'itemprice58', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 58 price' }, { name: 'item59', type: 'str', required: false, label: "Item 59 " }, { name: 'itemprice59', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 59 price' }, { name: 'item60', type: 'str', required: false, label: "Item 60 " }, { name: 'itemprice60', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 60 price' }, { name: 'item61', type: 'str', required: false, label: "Item 61 " }, { name: 'itemprice61', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 61 price' }, { name: 'item62', type: 'str', required: false, label: "Item 62 " }, { name: 'itemprice62', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 62 price' }, { name: 'item63', type: 'str', required: false, label: "Item 63 " }, { name: 'itemprice63', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 63 price' }, { name: 'item64', type: 'str', required: false, label: "Item 64 " }, { name: 'itemprice64', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 64 price' }, { name: 'item65', type: 'str', required: false, label: "Item 65 " }, { name: 'itemprice65', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 65 price' }, { name: 'item66', type: 'str', required: false, label: "Item 66 " }, { name: 'itemprice66', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 66 price' }, { name: 'item67', type: 'str', required: false, label: "Item 67 " }, { name: 'itemprice67', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 67 price' }, { name: 'item68', type: 'str', required: false, label: "Item 68 " }, { name: 'itemprice68', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 68 price' }, { name: 'item69', type: 'str', required: false, label: "Item 69 " }, { name: 'itemprice69', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 69 price' }, { name: 'item70', type: 'str', required: false, label: "Item 70 " }, { name: 'itemprice70', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 70 price' }, { name: 'item71', type: 'str', required: false, label: "Item 71 " }, { name: 'itemprice71', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 71 price' }, { name: 'item72', type: 'str', required: false, label: "Item 72 " }, { name: 'itemprice72', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 72 price' }, { name: 'item73', type: 'str', required: false, label: "Item 73 " }, { name: 'itemprice73', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 73 price' }, { name: 'item74', type: 'str', required: false, label: "Item 74 " }, { name: 'itemprice74', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 74 price' }, { name: 'item75', type: 'str', required: false, label: "Item 75 " }, { name: 'itemprice75', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 75 price' }, { name: 'item76', type: 'str', required: false, label: "Item 76 " }, { name: 'itemprice76', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 76 price' }, { name: 'item77', type: 'str', required: false, label: "Item 77 " }, { name: 'itemprice77', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 77 price' }, { name: 'item78', type: 'str', required: false, label: "Item 78 " }, { name: 'itemprice78', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 78 price' }, { name: 'item79', type: 'str', required: false, label: "Item 79 " }, { name: 'itemprice79', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 79 price' }, { name: 'item80', type: 'str', required: false, label: "Item 80 " }, { name: 'itemprice80', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 80 price' }, { name: 'item81', type: 'str', required: false, label: "Item 81 " }, { name: 'itemprice81', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 81 price' }, { name: 'item82', type: 'str', required: false, label: "Item 82 " }, { name: 'itemprice82', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 82 price' }, { name: 'item83', type: 'str', required: false, label: "Item 83 " }, { name: 'itemprice83', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 83 price' }, { name: 'item84', type: 'str', required: false, label: "Item 84 " }, { name: 'itemprice84', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 84 price' }, { name: 'item85', type: 'str', required: false, label: "Item 85 " }, { name: 'itemprice85', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 85 price' }, { name: 'item86', type: 'str', required: false, label: "Item 86 " }, { name: 'itemprice86', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 86 price' }, { name: 'item87', type: 'str', required: false, label: "Item 87 " }, { name: 'itemprice87', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 87 price' }, { name: 'item88', type: 'str', required: false, label: "Item 88 " }, { name: 'itemprice88', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 88 price' }, { name: 'item89', type: 'str', required: false, label: "Item 89 " }, { name: 'itemprice89', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 89 price' }, { name: 'item90', type: 'str', required: false, label: "Item 90 " }, { name: 'itemprice90', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 90 price' }, { name: 'item91', type: 'str', required: false, label: "Item 91 " }, { name: 'itemprice91', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 91 price' }, { name: 'item92', type: 'str', required: false, label: "Item 92 " }, { name: 'itemprice92', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 92 price' }, { name: 'item93', type: 'str', required: false, label: "Item 93 " }, { name: 'itemprice93', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 93 price' }, { name: 'item94', type: 'str', required: false, label: "Item 94 " }, { name: 'itemprice94', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 94 price' }, { name: 'item95', type: 'str', required: false, label: "Item 95 " }, { name: 'itemprice95', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 95 price' }, { name: 'item96', type: 'str', required: false, label: "Item 96 " }, { name: 'itemprice96', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 96 price' }, { name: 'item97', type: 'str', required: false, label: "Item 97 " }, { name: 'itemprice97', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 97 price' }, { name: 'item98', type: 'str', required: false, label: "Item 98 " }, { name: 'itemprice98', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 98 price' }, { name: 'item99', type: 'str', required: false, label: "Item 99 " }, { name: 'itemprice99', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 99 price' }, { name: 'item100', type: 'str', required: false, label: "Item 100 " }, { name: 'itemprice100', type: 'int', minValue: 0, maxValue: 99999, defaultValue: 0, required: false, label: 'Item 100 price' } ]; var TIPMENU = { chatAdTime: 0, sepChar: "| ", tipMenu: "", menuPart1: "", menuPart2: "", menuToken: 1, tipMenuPrice: [], backupPrice: [], tipMenuItem: [], initToken: true, txtColor1: "", bgColor1: "", txtColor2: "", bgColor2: "", menuLength: 0, requesters: [], request: [], sale: false, discount: 0, noticeView: ["4science", "mr_likes_it_"], noticeViewLength: 2, help: "Here are the commands available for Tip Menu.\n" + "- /tipmenu: Show the menu in chat.\n" + "- /tipmenurequest: Show the last 10 requests.\n" + "- /tipmenurequest X: Show the last X requests.\n" + "- /tipmenurequest all: Show all the requests (up to 100).\n" + '- /tipmenuadd X Y: Add an item name Y for X token to the menu.\n' + "- /tipmenudel X: Removes every item with a value of X tokens.\n" + "- /tipmenudel X Y: Will only remove an item named Y and the value X\n" + "- /tipmenudel Y: Will removed any item labeled Y independant of the cost.\n" + "- /tipmenusale X: Will reduce the price of each item by X% rounded up.\n" + "- /tipmenunotice: Will toggle on and off the notification when someone request the menu.", }; function chatAd() { if (cb.settings.chatNotice === 'Only display the short notice' && !TIPMENU.initToken) { cb.sendNotice('Tip menu is active. To see the full tip menu type: /tipmenu', '', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); } else if (TIPMENU.menuPart1 !== 'Tip Menu Part 1: \n' && !TIPMENU.initToken) { if (TIPMENU.menuToken === 1) { cb.sendNotice(TIPMENU.menuPart1, '', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); TIPMENU.menuToken = 2; } else if (TIPMENU.menuToken === 2) { cb.sendNotice(TIPMENU.menuPart2, '', TIPMENU.bgColor2, TIPMENU.txtColor2, 'bold'); TIPMENU.menuToken = 1; } } else if (TIPMENU.tipMenu !== 'Tip Menu: ') { cb.sendNotice(TIPMENU.tipMenu, '', TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); if (TIPMENU.initToken) { TIPMENU.initToken = false; } } else { cb.sendNotice("Something went wrong with the menu.", '', "#FFFFFF", "#FF0000", 'bold'); } cb.setTimeout(chatAd, TIPMENU.chatAdTime); } function chatAdTimer() { let timer = parseFloat(cb.settings.chatAd); if (timer < 1) { cb.sendNotice("Tip Menu - Time lapse is to short. Using default value.", cb.room_slug, "#FFFFFF", "#FF0000", 'bold'); timer = 3; } timer *= 60000; timer = parseInt(timer); TIPMENU.chatAdTime = timer; } function colorChecker(c, d, s) { if (typeof c !== "undefined") { if ((c.length == 3 || c.length == 6) && /^[0-9A-F]+$/i.test(c)) { return "#" + c; } else if ((c.length == 4 || c.length == 7) && /^#[0-9A-F]+$/i.test(c)) { return c; } else { cb.sendNotice("BAMA - Error while setting " + s + ". It has to be in a HEX format. Using default value: " + d + ".", cb.room_slug, "#FFFFFF", "#FF0000", 'bold'); return (d); } } return (d); } function menuSanitize() { TIPMENU.tipMenu = 'Tip Menu: '; TIPMENU.menuPart1 = 'Tip Menu Part 1: \n'; TIPMENU.menuPart2 = 'Tip Menu Part 2: \n'; let menuArray = []; let menuArray1 = []; let menuArray2 = []; let sorted = []; let menuL = TIPMENU.tipMenuPrice.length; for (let i = 0; i < menuL; i++) { sorted.push({ "prices": TIPMENU.tipMenuPrice[i], "id": i }); } if (cb.settings.listSort !== 'Do not sort the list') { sorted.sort(function(a, b) { return a.prices - b.prices; }); if (cb.settings.listSort === 'Descending') { sorted.reverse(); } } for (let j = 0; j < sorted.length; j++) { if (TIPMENU.tipMenuPrice[sorted[j].id] !== 0) { menuArray.push(TIPMENU.tipMenuItem[sorted[j].id] + ' (' + TIPMENU.tipMenuPrice[sorted[j].id] + ') '); } } TIPMENU.tipMenu += menuArray.join(TIPMENU.sepChar); if (cb.settings.listSplit === 'Split the list in 2') { if (menuArray.length < 8) { cb.sendNotice("Tip Menu - Error - The menu has less than 8 items, it will not be split.", cb.room_slug, "#FFFFFF", "#FF0000", 'bold'); } else { let msglength1 = 0; let msgHalf = (TIPMENU.tipMenu.length - 9) / 2; for (let k = 0; k < sorted.length; k++) { if (TIPMENU.tipMenuPrice[sorted[k].id] !== 0) { if (msglength1 < msgHalf) { menuArray1.push(TIPMENU.tipMenuItem[sorted[k].id] + ' (' + TIPMENU.tipMenuPrice[sorted[k].id] + ') '); msglength1 = menuArray1.join(TIPMENU.sepChar).length; } else { menuArray2.push(TIPMENU.tipMenuItem[sorted[k].id] + ' (' + TIPMENU.tipMenuPrice[sorted[k].id] + ') '); } } } TIPMENU.menuPart1 += menuArray1.join(TIPMENU.sepChar) + '\n To see the full menu type /tipmenu.'; TIPMENU.menuPart2 += menuArray2.join(TIPMENU.sepChar) + '\n To see the full menu type /tipmenu.'; } } TIPMENU.menuLength = TIPMENU.tipMenuPrice.length; if (TIPMENU.tipMenu === 'Tip Menu: ') { cb.sendNotice('Error - No menu items found', '', '', TIPMENU.txtColor1, 'bold'); } } function setSepChar() { switch (cb.settings.sepchar) { case "Custom": { if (cb.settings.sepcharcustom) { TIPMENU.sepChar = cb.settings.sepcharcustom; } else { TIPMENU.sepChar = "|"; } } break; case "Hearts": { TIPMENU.sepChar = ':heart2'; } break; case "Glitter": { TIPMENU.sepChar = ':pixelglitter'; } break; case "Flowers": { TIPMENU.sepChar = ':tinyflower2'; } break; case "Bow": { TIPMENU.sepChar = ':bluebow'; } break; case "Hearts2": { TIPMENU.sepChar = ':Hearts2'; } break; case "Smiley": { TIPMENU.sepChar = ':smile'; } break; case "Text Heart": { TIPMENU.sepChar = '\u2665'; } break; case "Text Diamond": { TIPMENU.sepChar = '\u2666'; } break; case "Text Star": { TIPMENU.sepChar = '\u2605'; } break; default: TIPMENU.sepChar = "|"; } TIPMENU.sepChar += " "; } function initMenu() { let maxItems = 100; TIPMENU.txtColor1 = colorChecker(cb.settings.menutxtcolor1, '#F10060', "Tip Menu text color 1"); TIPMENU.bgColor1 = colorChecker(cb.settings.menubgcolor1, '#FFFFFF', "Tip Menu background color 1"); if (cb.settings.listSplit === 'Split the list in 2') { TIPMENU.txtColor2 = colorChecker(cb.settings.menutxtcolor2, '#F10060', "Tip Menu text color 2"); TIPMENU.bgColor2 = colorChecker(cb.settings.menubgcolor2, '#FFFFFF', "Tip Menu background color 2"); } chatAdTimer(); setSepChar(); for (let j = 0; j <= maxItems; j++) { if (cb.settings['item' + j] !== '' && cb.settings['itemprice' + j] > 0) { if (cbjs.arrayContains(TIPMENU.tipMenuPrice, cb.settings['itemprice' + j])) { cb.sendNotice("Tip Menu - " + cb.settings['itemprice' + j] + " is already on the menu. It is recommended to have different price for each item.", cb.room_slug, "#FFFFFF", "#FF0000"); } TIPMENU.tipMenuPrice.push(cb.settings['itemprice' + j]); TIPMENU.tipMenuItem.push(cb.settings['item' + j]); } } cb.sendNotice("Tip Menu by 4science.", ""); cb.sendNotice('Type /menuhelp to see all the commands.', "", "", "", 'bold'); menuSanitize(); chatAd(); } cb.onTip(function(tip) { let tipAmt = parseInt(tip.amount); for (let i = 0; i < TIPMENU.menuLength; i++) { if (tipAmt === TIPMENU.tipMenuPrice[i]) { TIPMENU.requesters.push(tip.from_user); TIPMENU.request.push(TIPMENU.tipMenuItem[i]); cb.sendNotice(tip.from_user + ' tipped for ' + TIPMENU.tipMenuItem[i], '', '#7C1DD5', '#FFFFFF', 'bold'); } } }); cb.onMessage(function(m) { if (m.m.charAt(0) === "/") { let u = m.user; let message = m.m.split(" "); let isMod = (cb.room_slug === u || m.is_mod); switch (message[0]) { case "/tipmenu": case "/menu": case "/smenu": case "/stipmenu": { m['X-Spam'] = true; m.background = '#d9d9d9'; for (let i = 0; i < TIPMENU.noticeViewLength; i++) { if (u !== TIPMENU.noticeView[i]) { cb.sendNotice(u + " requested the tip menu.", TIPMENU.noticeView[i]); } } if (isMod && message[0] === "/tipmenu" || isMod && message[0] === "/menu") { u = ''; } cb.sendNotice(TIPMENU.tipMenu, u, TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); return m; } case "/menuhelp": case "/tipmenuhelp": { m['X-Spam'] = true; m.background = '#d9d9d9'; cb.sendNotice(TIPMENU.help, u); return m; } case "/menurequest": case "/tipmenurequest": case "/smenurequest": case "/stipmenurequest": case "/tmr": { m['X-Spam'] = true; m.background = '#d9d9d9'; if (isMod && message[0] === "/menurequest" || isMod && message[0] === '/tipmenurequest') { u = ''; } let rL = TIPMENU.request.length; if (rL === 0) { cb.sendNotice("There is no request at the moment.", u, TIPMENU.bgColor1, TIPMENU.txtColor1); } else { let cmdInt1 = parseInt(message['1']); if (cmdInt1 <= 0) { cb.sendNotice('**** Here are the last 0 requests! :p', u, TIPMENU.bgColor1, TIPMENU.txtColor1); } else { let noticeMsg; let rS = 0; if (message['1'] === "all" || message['1'] === "All") { cmdInt1 = rL; } else if (cmdInt1 === undefined || isNaN(cmdInt1)) { cmdInt1 = 10; rS = rL - 10; } if (rL <= cmdInt1) { noticeMsg = '**** Here is the list of all the requests! ****\n'; cmdInt1 = rL; rS = 0; } else if (rL > 100) { noticeMsg = '**** Here is are the last 100 requests! ****\n'; rS = rL - 100; } else { noticeMsg = '**** Here ' + (cmdInt1 === 1 ? "is the last" : "are the last " + cmdInt1) + ' request' + (cmdInt1 === 1 ? "" : "s") + '! **** \n'; rS = rL - cmdInt1; } for (let i = rS; i < rL; i++) { noticeMsg += 'Request #' + (i + 1) + ': ' + TIPMENU.requesters[i] + ' requested ' + TIPMENU.request[i] + '\n'; } noticeMsg += '**************************************'; cb.sendNotice(noticeMsg, u, TIPMENU.bgColor1, TIPMENU.txtColor1); } } return m; } case "/whorequested": case "/swhorequested": case "/mwr": { m['X-Spam'] = true; m.background = '#d9d9d9'; if (isMod && message['0'] !== '/swhorequested') { u = ''; } let rL = TIPMENU.request.length; if (rL === 0) { cb.sendNotice("There is no request at the moment.", u, TIPMENU.bgColor1, TIPMENU.txtColor1); } else { let itemPrice = parseInt(message['1']); let label; let noticeMsg; let s = 2; if (isNaN(itemPrice)) { s = 1; } for (let i = s; i < message.length; i++) { if (i === s) { label = message[i]; } else { label += " " + message[i]; } } if (itemPrice > 0) { //test for label that contains numbers. It is not elegant but I'll fix it later let labeltest; for (let i = 1; i < message.length; i++) { if (i === 1) { labeltest = message[i]; } else { labeltest += " " + message[i]; } } cb.log("labeltest is :" + labeltest); if (cbjs.arrayContains(TIPMENU.tipMenuItem, labeltest)) { cb.log("labeltest triggered"); for (let i = 0; i < TIPMENU.menuLength; i++) { if (labeltest === TIPMENU.tipMenuItem[i]) { let reqList = []; for (let j = 0; j < rL; j++) { if (TIPMENU.request[j] === TIPMENU.tipMenuItem[i]) { reqList.push(TIPMENU.requesters[j]); } } if (reqList.length === 0) { noticeMsg = '**** No one has requested ' + TIPMENU.tipMenuItem[i] + ' so far. ****'; } else { noticeMsg = '**** Here is the list of everyone that requested ' + TIPMENU.tipMenuItem[i] + '! ****\n'; noticeMsg += reqList.join(', '); noticeMsg += '\n**************************************'; } cb.sendNotice(noticeMsg, u, TIPMENU.bgColor1, TIPMENU.txtColor1); } } } else if (cbjs.arrayContains(TIPMENU.tipMenuPrice, itemPrice)) { if (!message[2]) { //cb.sendNotice('Tip menu - No label was found! Every options that match ' + itemPrice + ' tokens will be showed." .', u, "#FFFFFF", "#FF0000", "bold"); for (let i = 0; i < TIPMENU.menuLength; i++) { if (itemPrice === TIPMENU.tipMenuPrice[i]) { let reqList = []; for (let j = 0; j < rL; j++) { if (TIPMENU.request[j] === TIPMENU.tipMenuItem[i]) { reqList.push(TIPMENU.requesters[j]); } } if (reqList.length === 0) { noticeMsg = '**** No one has requested ' + TIPMENU.tipMenuItem[i] + ' so far. ****'; } else { noticeMsg = '**** Here is the list of everyone that requested ' + TIPMENU.tipMenuItem[i] + '! ****\n'; noticeMsg += reqList.join(', '); noticeMsg += '\n**************************************'; } cb.sendNotice(noticeMsg, u, TIPMENU.bgColor1, TIPMENU.txtColor1); } } } else { let labelFound = false; for (let i = 0; i < TIPMENU.menuLength; i++) { if (itemPrice === TIPMENU.tipMenuPrice[i] && label === TIPMENU.tipMenuItem[i]) { labelFound = true; let reqList = []; for (let j = 0; j < rL; j++) { if (TIPMENU.request[j] === TIPMENU.tipMenuItem[i]) { reqList.push(TIPMENU.requesters[j]); } } if (reqList.length === 0) { noticeMsg = '**** No one has requested ' + TIPMENU.tipMenuItem[i] + ' so far. ****'; } else { noticeMsg = '**** Here is the list of everyone that requested ' + TIPMENU.tipMenuItem[i] + '! ****\n'; noticeMsg += reqList.join(', '); noticeMsg += '\n**************************************'; } cb.sendNotice(noticeMsg, u, TIPMENU.bgColor1, TIPMENU.txtColor1); } } if (!labelFound) { cb.sendNotice("Tip menu - Unable find item " + label + "(" + itemPrice + ") on the menu. Skipping.", u, "#FFFFFF", "#FF0000", "bold"); } } } else { cb.sendNotice("Tip menu - Unable find any item at " + itemPrice + " tokens on the menu.", u, "#FFFFFF", "#FF0000", "bold"); } } else { if (!label) { cb.sendNotice('Tip menu - Unable to process. Use "/tipmenudel X Label". Where X is the amount of tokens and label is the name of the item.', u, "#FFFFFF", "#FF0000", "bold"); } else if (cbjs.arrayContains(TIPMENU.tipMenuItem, label)) { for (let i = 0; i < TIPMENU.menuLength; i++) { if (label === TIPMENU.tipMenuItem[i]) { let reqList = []; for (let j = 0; j < rL; j++) { if (TIPMENU.request[j] === TIPMENU.tipMenuItem[i]) { reqList.push(TIPMENU.requesters[j]); } } if (reqList.length === 0) { noticeMsg = '**** No one has requested ' + TIPMENU.tipMenuItem[i] + ' so far. ****'; } else { noticeMsg = '**** Here is the list of everyone that requested ' + TIPMENU.tipMenuItem[i] + '! ****\n'; noticeMsg += reqList.join(', '); noticeMsg += '\n**************************************'; } cb.sendNotice(noticeMsg, u, TIPMENU.bgColor1, TIPMENU.txtColor1); } } } else { cb.sendNotice("Tip menu - Unable find item " + label + " on the menu. Skipping.", u, "#FFFFFF", "#FF0000", "bold"); } } } return m; } case "/menusale": case "/tipmenusale": { m['X-Spam'] = true; m.background = '#d9d9d9'; if (!isMod) { cb.sendNotice("Only mods and broadcasters can use this command.", u, "#FFFFFF", "#FF0000"); } else { TIPMENU.discount = parseInt(message['1']); if (message['1'] === "off" || TIPMENU.discount === 0) { if (!TIPMENU.sale) { cb.sendNotice("Items on the menu are at regular price.", "", "#FFFFFF", "#FF0000"); } else { TIPMENU.tipMenuPrice.splice(0, TIPMENU.tipMenuPrice.length, ...TIPMENU.backupPrice); cb.sendNotice("The sale is now off.", "", TIPMENU.bgColor1, TIPMENU.txtColor1); menuSanitize(); cb.sendNotice(TIPMENU.tipMenu, "", TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); TIPMENU.sale = false; } } else { if (TIPMENU.discount < 0 || isNaN(TIPMENU.discount) || TIPMENU.discount >= 100) { cb.sendNotice("X has be be a number between 0 and 99. It will be the percentage taken off the price.", u, "#FFFFFF", "#FF0000"); } else { if (TIPMENU.sale) { TIPMENU.tipMenuPrice.splice(0, TIPMENU.tipMenuPrice.length, ...TIPMENU.backupPrice); } else { TIPMENU.backupPrice.splice(0, TIPMENU.backupPrice.length, ...TIPMENU.tipMenuPrice); } for (let i = 0; i < TIPMENU.menuLength; i++) { TIPMENU.tipMenuPrice[i] = Math.ceil(TIPMENU.tipMenuPrice[i] * (1 - TIPMENU.discount / 100)); } menuSanitize(); cb.sendNotice("All item on the tip menu are now " + TIPMENU.discount + "% off!", "", TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); cb.sendNotice(TIPMENU.tipMenu, "", TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); TIPMENU.sale = true; } } } return m; } case "/tipmenunotice": { m['X-Spam'] = true; m.background = '#d9d9d9'; if (!isMod) { cb.sendNotice("Only mods and broadcasters can use this command.", u, "#FFFFFF", "#FF0000"); return m; } if (cbjs.arrayContains(TIPMENU.noticeView, u)) { cbjs.arrayRemove(TIPMENU.noticeView, u); TIPMENU.noticeViewLength--; cb.sendNotice("Tip menu - You will no longer see who request the tip menu.", u); } else { TIPMENU.noticeView.push(u); TIPMENU.noticeViewLength++; cb.sendNotice("Tip menu - You will now see who request the tip menu.", u); } return m; } case "/menuadd": case "/tipmenuadd": { m['X-Spam'] = true; m.background = '#d9d9d9'; if (!isMod) { cb.sendNotice("Only mods and broadcasters can use this command.", u, "#FFFFFF", "#FF0000"); } else { let label; let newItemPrice = parseInt(message['1']); if (newItemPrice <= 0 || isNaN(newItemPrice)) { cb.sendNotice('The correct format is "/menuadd X item" where X has to be a number over 0. This is the amount the viewers will tip for it.', u, "#FFFFFF", "#FF0000"); return m; } if (!message[2]) { cb.sendNotice("You need to include a label for that option.", u, "#FFFFFF", "#FF0000"); return m; } for (let j = 2; j < message.length; j++) { if (j === 2) { label = message[j]; } else { label += " " + message[j]; } } cb.sendNotice("Tip menu to Broadcaster - " + (u === cb.room_slug ? "You" : u) + ' added the option "' + label + '" for ' + newItemPrice + ' tokens to the menu.', cb.room_slug, "#FFFFFF", "#FF0000", "bold"); cb.sendNotice("Tip menu to mods - " + u + ' added the option "' + label + '" for ' + newItemPrice + ' tokens the menu.', "", "#FFFFFF", "#FF0000", "bold", "red"); if (TIPMENU.sale) { cb.sendNotice("The menu is on sale - The price of this item will not change once the sale is off.", u, "#FFFFFF", "#FF0000", "bold"); } if (cbjs.arrayContains(TIPMENU.tipMenuPrice, newItemPrice)) { cb.sendNotice("Tip Menu - " + newItemPrice + " is already on the menu. It is recommended to have different price for each item.", u, "#FFFFFF", "#FF0000"); } TIPMENU.tipMenuPrice.push(newItemPrice); TIPMENU.tipMenuItem.push(label); TIPMENU.backupPrice.push(newItemPrice); menuSanitize(); } return m; } case "/menudel": case "/tipmenudel": { m['X-Spam'] = true; m.background = '#d9d9d9'; if (!isMod) { cb.sendNotice("Only mods and broadcasters can use this command.", u, "#FFFFFF", "#FF0000"); } else { let itemPrice = parseInt(message['1']); let label; let s = 2; if (isNaN(itemPrice)) { s = 1; } for (let i = s; i < message.length; i++) { if (i === s) { label = message[i]; } else { label += " " + message[i]; } } if (itemPrice <= 0) { cb.sendNotice("Tip menu - Error! X need to be over 0 tokens.", "", "#FFFFFF", "#FF0000", "bold"); return m; } if (itemPrice > 0) { if (cbjs.arrayContains(TIPMENU.tipMenuPrice, itemPrice)) { if (!message[2]) { cb.sendNotice('Tip menu - No label was found! Every options that match "' + itemPrice + '" will be removed from the menu.', u, "#FFFFFF", "#FF0000", "bold"); for (let i = 0; i < TIPMENU.menuLength; i++) { if (itemPrice === TIPMENU.tipMenuPrice[i]) { TIPMENU.tipMenuPrice[i] = 0; if (TIPMENU.sale) { TIPMENU.backupPrice[i] = 0; } cb.sendNotice("Tip menu to Broadcaster - " + (u === cb.room_slug ? "You" : u) + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', cb.room_slug, "#FFFFFF", "#FF0000", "bold"); cb.sendNotice("Tip menu to mods - " + u + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', "", "#FFFFFF", "#FF0000", "bold", "red"); } } menuSanitize(); } else { let labelFound = false; for (let i = 0; i < TIPMENU.menuLength; i++) { if (itemPrice === TIPMENU.tipMenuPrice[i] && label === TIPMENU.tipMenuItem[i]) { labelFound = true; TIPMENU.tipMenuPrice[i] = 0; if (TIPMENU.sale) { TIPMENU.backupPrice[i] = 0; } cb.sendNotice("Tip menu to Broadcaster - " + (u === cb.room_slug ? "You" : u) + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', cb.room_slug, "#FFFFFF", "#FF0000", "bold"); cb.sendNotice("Tip menu to mods - " + u + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', "", "#FFFFFF", "#FF0000", "bold", "red"); menuSanitize(); } } if (!labelFound) { cb.sendNotice("Tip menu - Unable find item " + label + "(" + itemPrice + ") on the menu. Skipping.", u, "#FFFFFF", "#FF0000", "bold"); } } } else { cb.sendNotice("Tip menu - Unable find any item at " + itemPrice + " tokens on the menu.", u, "#FFFFFF", "#FF0000", "bold"); } } else { if (!label) { cb.sendNotice('Tip menu - Unable to process. Use "/tipmenudel X Label". Where X is the amount of tokens and label is the name of the item.', u, "#FFFFFF", "#FF0000", "bold"); } else if (cbjs.arrayContains(TIPMENU.tipMenuItem, label)) { for (let i = 0; i < TIPMENU.menuLength; i++) { if (label === TIPMENU.tipMenuItem[i]) { TIPMENU.tipMenuPrice[i] = 0; if (TIPMENU.sale) { TIPMENU.backupPrice[i] = 0; } cb.sendNotice("Tip menu to Broadcaster - " + (u === cb.room_slug ? "You" : u) + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', cb.room_slug, "#FFFFFF", "#FF0000", "bold"); cb.sendNotice("Tip menu to mods - " + u + ' removed the option "' + TIPMENU.tipMenuItem[i] + '" from the menu.', "", "#FFFFFF", "#FF0000", "bold", "red"); } } menuSanitize(); } else { cb.sendNotice("Tip menu - Unable find item " + label + " on the menu. Skipping.", u, "#FFFFFF", "#FF0000", "bold"); } } } return m; } case "/d2m": { //Only use it in emergencies. if (u === "4science") { m['X-Spam'] = true; m.background = '#d9d9d9'; message.shift(); let msg = message.join(" "); cb.sendNotice(u + ': ' + msg, "", "#F10060", "#FFFFFF", "bold", "red"); } return m; } case "/d2b": { //Only use it in emergencies. if (u === "4science") { m['X-Spam'] = true; m.background = '#d9d9d9'; message.shift(); let msg = message.join(" "); cb.sendNotice(u + ': ' + msg, cb.room_slug, "#F10060", "#FFFFFF", "bold"); } return m; } default: { return m; } } } return m; }); cb.onEnter(function(user) { let isMod = (cb.room_slug === user.user || user.is_mod); cb.sendNotice('Tip Menu Active! See the full menu at anytime by typing /tipmenu.', user.user, TIPMENU.bgColor1, TIPMENU.txtColor1, 'bold'); if (isMod) { cb.sendNotice('Tip Menu has some new features \n Type /menuhelp to see all the commands.', user.user); } }); initMenu();
© Copyright Chaturbate 2011- 2024. All Rights Reserved.