Short Description:
A familiar take on tip menus but with new features and a second, hidden menu for broadcasters to share with special viewers
Full Description
Smoker's Multiphasic Tip Menu
About me
I am a software developer and software manager by profession. This is my first foray into JavaScript development and I will continue to iterate on this bot as my JavaScript skills and knowledge increase. My philosophy is that code should be readable by others, including my future self. To that extent, anyone reading the source code might find it to be slightly verbose, but hopefully it makes it easier to understand and verify. I aim for a very straightforward OO/procedural style. I welcome feedback from other developers and will duly credit them if I use their suggestions.
I have opted to release the source code for this bot, as I will do any others I write. By being open source, I hope that broadcasters will be able to trust that the bots I write do what I say they do and only what I say they do. Rumours abound on CB about bot authors who use their bots to glean private information from broadcaster and to implement scams. As I was learning the CB API, for example, it only took a few minutes to write a malicious bot would send me all incoming tip notes just by being in the room where said bot was running. In my opinion, broadcasters should take extra care to only use bots that they absolutely trust. Again, by releasing mine as open source I hope to gain that trust and to encourage other bot authors to engage in the same practice.
About this bot
The concept for this bot was originally suggested by my friend Lostmedic who was looking for a tip menu that incorporated fan club pricing AND which had a separate, private menu that broadcasters could use to share special items with their most important viewers. While My Menu by bobodeluxe incorporates fan club discounts, I couldn’t find a tip menu bot that incorporated all the features I wanted to include, so I proceed to write this one in my spare time over 3 days.
Features:
- Familiar, but even cleaner, look and feel. The Menu by i0_ol has, in my opinion, the cleanest look and feel of any tip menu I’ve encountered on CB, and I’ve chosen to emulate it. Requiring only a single colour for a theme is sheer joy in design for its simplicity. Unlike The Menu, though, I am limiting separators to emojis only (no gifs) but providing a much larger set to choose from. Separators for the menu titles and items, and for the notices that are issued when a tip is received, can be selected individually. Each separator can be set to RANDOM which will select a random emoji on each execution.
- Limited but useful built-in colour themes. I’ve provided 10 build-in colour themes, including the default “Smoker’s Theme”. Each passes CWAG 2 by having a colour contrast ratio in excess of 4.5. While custom themes can be specified now, CWAG 2 validation and adjustment of custom themes will only be added in the next release of this bot. Kudos again to 0_ol for calling this out in his documentation for The Menu.
- The bot uses a general colour theme and then allows a different one to be used for the hidden menu. Custom themes can also be specified for moderator, fan club, and regular messages that are sent when a tip is received.
- The weight of text in notices can be set to ‘normal’, ‘bold’, or ‘bolder’. The default is ‘bold’ which I recommend, though ‘normal’ also looks good. ‘bolder’ is there for completeness and I’m open to feedback about whether to keep it as an option or not.
- Separate messages, colour themes, and separators can be specified for messages for tips from moderators and fan club members. Anonymous tipping uses the default colour theme and overrides being a moderator or fan club member.
- The frequency that the menu is displayed to the room can be set from 1 to 10 minutes, inclusive, and defaults to 4 minutes.
- Both multi line and single line styles are supported.
- The regular menu allows for optional fan club pricing. E.g., “Show feet” might be regularly priced at 42, but could be priced at 35 for fan club members. This would appear in the menu display as “Show feet (42 - FC:35)”. In this examples, fan club members tipping either 35 or 42 would trigger the item. I am open to feedback on whether it should only trigger the item when fan club members tip 35 and not 42.
- All menu items can be disabled without being removed.
- The menu items are automatically sorted by regular price in ascending order. No other sorting options are available. If other sort orders are desired, please provide feedback to that effect.
Settings:
I hope all the settings are straightforward enough. Feedback would be appreciated if any need clarification.
For customizible messages, the following, optional, placeholders are supported:
Menu titles:
- %broadcaster% - will be replaced with the broadcaster's name in lowercase
- %broadcaster_caps% - will be replaced with the broadcaster's name with the first letter and each letter after an underscore capitalized
Thank you messages:
- %separator% - the emoji separator to use
- %username% - the username of the tipper, or "anonymous user" for anonymous tips
- %tip_amount% - the amount that was tipped
Tipped for messages:
- %separator% - the emoji separator to use
- %username% - the username of the tipper, or "anonymous user" for anonymous tips
- %tip_amount% - the amount that was tipped
- %tipmenuitem_description% - the description of the item that was tipped for
Known issues:
- Occasionally the notices for the two menus can be displayed out of order. For this reason picking a distinct colour scheme for the hidden menu can be advantageous.
- If a moderator who is also a fan club member is eligible to receive the hidden menu because both groups are eligible then they will receive the hidden menu twice when it is sent to all users.
Lessons learned:
- When processing onMessage events, it is best to work with a trimmed version of the message string as there is often extraneous whitespace on it that will trip up your parsing.
- Ordering multiple notices that make a single visual ”object” is a massive pain in the ass. I'm pretty sure I'll be iterating on this problem a lot.
Notes:
- Fan club members tipping anonymously will still get fan club discounts even through the notice will be in the default message theme.
- Fan club members will trigger tips at both the regular and fan club prices.
- Special viewers who are granted access to the hidden menu should consider tipping anonymously if it is available if they wish to avoid being singled out in the room.
Feedback
I hope you this bot meets your needs and that you and your viewers enjoy using it.
Feedback and feature requests can be made via Telegram @smoker919.
© Copyright Chaturbate 2011- 2024. All Rights Reserved.