################################################################################## # Author: BlushyFace # Contact: info@blushyface.com # Website: http://blushyface.com/ # Twitch: https://www.twitch.tv/blushyface # Paypal: donation@blushyface.com # GNU GPLv3 license + BEER-WARE license. See Licence.txt ################################################################################## # Requirements: Any potato pc with Windows or Linux with .Net framework 4.5.x or higher installed, 32/64bit cpu, 10mb+ disk space for data and charts internet connection # Optional: MsSql 2014 or higher installed if external database storage is enabled ################################################################################## [Features] added/changed/fixed 2017/jan/02 General - Chat -- added when posting a website link, it will attempt to grab the title and show it in chat -- added chat history (requires database storage) 2017/jan/01 General - config -- added rootdir in config so that files can be saved in other directories. Default is same directory where the application runs - users -- added multi channel support (meaning if you run multiple channels you can combine user info or check if your users watch your other channels) example: allow users to use their inventory items from one channel to your other channels or combine their currency to buy an item Achievements are channel based and can only be achieved per channel meaning users might earn the same achievements but not for the same channel - database -- added multi channel support --- changed users table --- changed followers table - achievements -- added a bunch of new achievements (30+), see http://blushyface.com/blog/2017/01/01/more-achievements-added/ Bugs - fixed -> when inserting a new user, the user could be empty - fixed -> when no database was used it was stil trying to connect 2016/dec/29 -- added visit count to check how many times a user has visited a channel, and last visit date - achievements -- added achievement "Donator", 25 points when donating using streamlabs (donation name must be same name as twitch to achieve this achievement automatically) -- added achievement "Gamewhisperer" 25 points (when subbing using gamewisp, this achievement needs to be added manually until i've added gamewisp support) -- added achievement "Hoster" 15 points that is achieved by (auto) hosting the channel -- added achievement "Commander" 10 points that is achieved by using a command for the first time -- added achievement "Welcome" 5 points that is achieved by visiting the channel for the first time -- added achievement "Chatter" 5 points that is achieved by saying something in chat for the first time -- there are more but no fun when people know how to achieve them.. so secret! --- note #1: achievements are stored in a database, as such a database is required to enable achievements --- note #2: when achieving an achievement, there is no notification but maybe notify the user with a whisper? --- note #3: every achievement can be disabled if unwanted, to do so update the achievement in the database "IsAchievable" to 0 - changed when moving from BlushyFaceBot v1 to v2 for the first time, the follower list is copied from v1 to v2 so that the unfollowers / refollowers list will remain intact while the user object will be updated from v1 to v2 -- note: when the user in BlushyFaceBot v1 does not exist in v2 the follower will not be assigned a userid until the user has actually visited the channel at least once, (users from blushyfacebot v1 will NOT be moved over, although if people really need this feature I can add it but I want to focus on v2 while only fixing v1 when needed), in non technical terms: don't worry about it. 2016/dec/28 General - changed rewrote the inventory system and the way it was being handled. User inventory is now saved/loaded from a database and contain basic test items so it can be tested -- ideas for user achievements / items are welcome - changed viewer inventory includes both items and achievements and is stored in the user object 2016/dec/28 General - added MsSql database support -- save/load user data --- user inventory --- user achievements -- session data to charts -- streamlabs donations 2016/dec/25 General - added ftp support to upload stream session chart stats -- to enable ftp support, add ftpusername=yourusename , ftppassword=yourpassword and ftpadress=ftpurl in \config\config.txt -- command -> !stats to link the stream session chart in chat 2016/dec/21 General - added custom ranks in \config\ranks.txt (note: user ranks resets everytime when closing the bot atm) - changed chart -> users chatting bar in chart based on unique users chatting instead of per message 2016/dec/20 General - added basic chart support to show stream session statistics visually in \media\ 2016/dec/16 General - added basic stream statistics output in console (by default every PING) - added ranks (no settings yet) - added support for Streamlabs legacy token, add in \config\config.txt -> streamlabs_legacy_token=... -- note, the streamlabs_legacy_token is preferred until the streamlabs_access_token generation within the bot has been added (if you have a non legacy access_token then that is preferred) 2016/dec/15 General - added logging to log api calls/exceptions/chat to file in \logs\ , logger also writes to console (default disabled) - changed TimerHandler to handle each timer seperately instead of one timer to handle all Twitch chat - added whisper support (receiving and sending) - added follow notification in chat -> thanks user for following the channel - added host notification in chat -> thanks user for hosting the channel Twitch API - added !follower command to see how long someone has followed (or not) - added !timer to enable or disable all timers (default enabled) - added !timedmessages to enable or disable timed messages. Note: will not enable if all timers are disabled. (default disabled) - added !profile to show currency and time in chat (does not save upon closing bot yet) 2016/dec/14 General - added Session Id for showing statistics per stream session (if using external db, everyone can view your stream stats) 2016/dec/13 Twitch chat - added user chat role (moderators,staff,admins,global_mods,viewers) -- also allows to auto check for role change in preparation for user ranks (same mechanics, but user defined ranks running in conjunction with twitch roles) - added console output to show new followers -Other -- cleaned up some functions (output messages that are not used anymore) 2016/dec/12 General - streamlabs -- support for pagination to grab previous donations -- added in config streamlabs_access_token and streamlabs_refresh_token 2016/dec/11 Twitch chat - show send and received messages in console General - added caching for follower list - added default sleep (250ms) to prevent hammering api calls in Util.GetUrlToJson() - added re attempts to grab Twitch API data in case it fails in Util.GetUrlToJson() , default is 3 retries - added basic streamlabs API support to handle donations 2016/dec/10 General - tester app included - authenticate using clientid or oauth_token Twitch API - authenticate -- authenticate using clientid / oAuth token from a tester application or read from file in config\config.txt - channels -- channel info -- list of followers - streams -- shows channels that have less than x viewers for game y -- show x rank based on current viewers for game y Twitch chat - read/send messages - IRCv3 tag support (requires CAP REQ :twitch.tv/tags) - custom commands with sfx in config\commands.txt Twitch chat commands - !timer enable/disable timed commands. Default on - !rank / !rank to check the channel rank of the game that is currently being streamed. ################################################################################## [TODO/In progress] General - Written for Twitch API v3 but support for Twitch API v5 is added where possible - in progress logging errors / api calls to analyze and optimize in the future. Log files will be written in \logs\ - in progress 3rd party API support such as streamlabs -> authorize within the application - in progress add functionality from the old BlushyFaceBot -> http://blushyface.com/blog/category/blushyfacebot/ - [done] in progress add user achievements such as channel reached x viewer this stream session etc - [done] in progress add user inventory such as song request tokens, mini game badges etc - [done] in progress currency gain - [done] in progress time in chat -- note: data is not saved atm so it's "gone" upon closing the bot - todo support for local but also external mssqql/sqllite/nosql data storage - todo stream up time - todo customizable donation rewards (combination of user inventory / achievements but not limited to) - todo support for discord - todo add plugin support so that users can write their own add-ons - todo stream session into handy charts to visualize the stream statistics per session - todo add gamewisp support to check new subs Mini games - game ideas -- trivia -- maths -- bank robbery type -- treasure hunting (with procedural map generation) - depending on type of game -- leaderboard / global leaderboard to show top player stats for every channel that plays the game in any channel that uses the bot (needs to allow external storage) -- achievements + date accomplished / badges etc that can be viewed (such as website) / tokens that can be consumed example a song request token or permanent unlocked items such as cosmetic chat avatar item -- with currency support, viewers can buy / sell items for a type of game that supports it Twitch API - support for endpoints such as: Blocks Channel Feed Channels Chat Follows Games Ingests Root Search Streams Subscriptions Teams Users Videos Twitch chat - [done] todo whisper support - [done] todo log chat in a database or chatlog file - todo viewer permissions / permission level - [done] todo viewer ranks / custom ranks - [done] todo custom currency - [done] todo gain curreny in chat - todo minigames - todo notifications in chat such as (auto)hosts/(re)subs, follows + unfollows - todo support for txt files to add in obs/xsplit etc to show on overlay - [done] todo list of channels that host the streaming channel - [done] todo queued (timed) messages that shows in order (example chat rules) ################################################################################## [Other] (Not planned/SoonTM/Nice to have) - soonTM documentation how to use the BlushyFaceTwitchLib (use tester app for now to see how it works) - nice to have text to speech chat (old BlushyFaceBot can already do that so it should be relatively easy to add) - nice to have bot interface besides console input/output. Application form? web based? - nice to have add self hosting server to allow multiple users to use control the bot using a webbased interface - SoonTM draw user achievement/item images - SoonTM add website to show user achievements / inventory - SoonTM add shop for users to buy items - SoonTM allow items to be given/traded to other users ################################################################################## [Note] - I'm taking feature requests (no promise), just let me know at my site -> http://blushyface.com/ --> http://blushyface.com/community/ ################################################################################## [Example output tester] ### Validating user ### Identified: True Valid OAuth_token: True Name: - Channel: #- Available scopes: chat_login ### Getting Streamlabs donation messages (latest 5, default 25) ### ### Getting Streamlabs donation messages (all donations made) ### ### Trying to find follower: blushyface ### Follower blushyface cannot be found ### Getting all followers -> first time calling no cache ### Channels(auth).GetChannelAllFollowers(blushyface) Time to complete: 00:00:07.1708986 ### Getting all followers -> this should be cached ### Channels(auth).GetChannelAllFollowers(blushyface) Time to complete: 00:00:00.0000294 ### Getting all followers -> forcing a refresh and get all up to date followers ### Channels(auth).GetChannelAllFollowers(blushyface) Time to complete: 00:00:06.9179562 BlushyFace is currently not streaming. Jax_Macky is currently not streaming. FACEIT TV is currently not streaming. pugsly271 is currently not streaming. ChefLethalPlays's currently ranked: 7/351 in category: Creative ### ### ### Connecting to chat.. connected! Timed commands enabled: yes ### ### ###