gocnak / botnak Goto Github PK
View Code? Open in Web Editor NEWA Java-based IRC chat client with focus on Twitch.tv streams.
Home Page: https://gocnak.github.io/Botnak
License: MIT License
A Java-based IRC chat client with focus on Twitch.tv streams.
Home Page: https://gocnak.github.io/Botnak
License: MIT License
Use the built in VLC library along with http://jultech.wordpress.com/2013/12/09/twitch-mobile-stream-api-2/ to watch streams using Botnak.
Not entirely sure how to explain it more than just what twitch chat is able to do (at least with BTTV) ... wherein if you press up arrow it can cycle through previously entered chats that you've done. The bad part with the implementation in twitch chat however, is that if you're typing in a long message, and see a mess-up that you wish to fix a "line" or two above where you're at, it dumps the message you'd been typing and starts cycling through the past messages... hence the request for botnak to recognize when the chat field has stuff in it that hasn't been sent before trying to cycle through previously sent stuff.
Now that the KappaHD issue is no longer a problem, another one arose with any face that has symbols as its regex.
For example: all of the ":" faces do not work (":D" ":(" ":)" ":|" etc) as well as the "<3" emote.
The characters may need an extra escape character added, but I'm not actually sure what is causing this.
Basically, if I'm planning on playing a game that's non-wide-screen, and want to have chat on screen, I'd love to have a thinner vertical chat rather than the wide chat.
it just doesn't detect my file even tho its on my desktop, its in wav format its 20kb and it just doesn't detect it.
Also a question: If we do not have a bot does the user execute commands in chat?
Question #2: Do chat commands carry over with botnak or do we manually have to add them(+how to do it)?
Just a reminder to update Botnak's website when the new features are ready to be released.
The BanQueue seems to not work anymore, so I need to investigate what Twitch did with the CLEARCHAT messages they sent, and make an appropriate fix.
I realize this will possibly be a capability when you get the viewer / chatting listing working, but possibly add the ability to start typing a name that's in chat and press tab to finish that person's name (almost standard in many IRC chats).
When someone subs, they "donate" $2.50 to the streamer. Adding the donation amount at the start would be easy -- so would keeping track of what time this occurred, so then a month later (if they don't disable auto-renew) it can add another $2.5 to their status.
Really would like a clear chat window ability. Yes, I know I can just close the tab, and re-open it to have the tab clear. But it would be nice to be able to right-click somewhere (be it in the chat section, or the tab itself), and select "clear chat"
This would be useful for me to use in my chat, seeing as I've got slow moving chat, and if someone says something and they get timed out, well, it takes a long time (if ever) for it to scroll off botnak :P
Added bonus if a command could be used to clear chat like !clear :)
When I go to the logging & cleanup section of the Settings. With Clear The Chat box checked. And you modify the number of lines from 100 and save it. It won't remember what that number is, and will default to 100.
A lot of other bots and BTTV have the option to select a random user based on a few parameters (if they're sub, how long in chat, etc) to win a raffle based on a certain keyword.
Botnak should have a simple !startraffle that allows a set of users to join (specified in the new Settings GUI to be based on time in chat, sub+, donator+ or whatever) and be randomly selected after the int time is up.
NOTE: Botnak MUST print out the following line when a raffle is initiated:
“This is a promotion from [channel name] . Twitch does not sponsor or endorse broadcaster promotions and is not responsible for them”.
Where as the [channel name] is the main account in Botnak. Raffles will only be able to be initiated in the main account's channel.
Basically the title :)
Either that, or a different method of adding multiple tabs (kind of like the "," separator to get a single tab with all the chat's in one tab) .. maybe use ";" ?
[Or both would be awesome :P]
To go with the other request for different chat size aspects, be able to have the chat remember what size and location that it was last at if the save and close is used.
Cleanup the files that Botnak creates, by combining some (all the user files -> users.db or something) and converting to binary.
This includes log files, since pure text is waaaay smaller in binary (a la Ghosting Mod files).
using !mod (name) doesn't yield the result one would think with the commands list.
On botnak, it sends in my screen the chat: ".mod (name)" like it came from me, however it actually doesn't send to standard IRC (having second window up with base IRC doesn't catch that .mod (name) statement). So in my botnak, it shows both me sending the !mod command, as well as the psuedo .mod chat.
Either way, it doesn't mod the person that you put as the argument.
Have an option for Botnak to automatically ban ASCII/Copypasta/Links etc, with user-specific options (toggles) for their liking. This goes along with the keyword blacklisting idea I had before.
Maybe even have a cloud support feature for this, where you can choose all the popular things to ban from other Botnak/Twitch bot users.
Possible option for keeping the window on top of others? (great for multi monitor setup and having maybe a browsing window with some info on it but still wanting to see chat)
Use the VLC player to handle youtube (and other websites maybe?) song requests.
What's the license?
Text commands in the current Botnak suck. They suck hard. So let's overhaul them by adding better support and recognition, as well as more features, like permission based commands (sub+ only, mod only, etc) and a generic timer that handles spamming them.
I realize this may have to change how commands are entered in? but it'd be nice to have the ability to have a custom command created that accepts arguments...
IE:
!addcommand raid %name% | Raid target > www.twitch.tv/%name%
so that when using !raid Gocnak, would have botnak spit out "Raid target > www.twitch.tv/Gocnak" ... or something along those lines. However, possibly would need some way to state that the message can or can not be sent without the argument ... so if I were to do a command that COULD accept an argument of someone's name so that the spit out message includes that person's name (for highlighting to them if they have anything alerting them to their name being said), or I could run the command without the argument and it'd still run fine? ... or would that take two commands then? CONFUSION!!! ...
anyway, yea... argumentative custom commands would be cool to have
I'll most likely just bunch it up with the "Admin" permission.
GitHub lets you get the full source code for any previous commit, as well as create tags which refer to specific milestones and binary downloads based on those tags.
Wouldn't it be a more logical idea to do all the work on the master branch and host stable downloads via the releases page (rather than Dropbox)? That would also make it more obvious from looking at the repository that Botnak is being actively worked on and maybe make people more likely to contribute.
GUIMain: remove lines 115 and 116, as they do not need to be initialized here.
Assign the title of the frame appropriately (check for bot, if channel is actually live, etc).
GUIStreams: move #readList(JList) (ln. 141) and #handleList() (ln. 152) from Utils to this class
IRCBot: Rid chatTime and !setreply (make a constant 5 second ask period or something),
~~add a "!stopsound" command (only stop the sound [useful for long songs/sounds] and not toggle it off), ~~
make Admins and Staff have Mod permissions (ln 138 and 222)
handleDev() is looking pretty bare... maybe it's its time to go :'(
Utils: Combine checkAndAdd() and addStringsToArray() (ln 169 and 185)
Consider making a Commands class to handle commands a lot better, getting rid of the nasty StringArray and Timer duo HashMap and potentially add the newline support as well. This will rid the horrendous getTimer(), getMessage(), handleMessage() etc methods from Utils and IRCBot and make it neater overall. It can also follow the permission format of sounds, where certain commands can be for certain people, though that's pretty rare.
Look into animated gifs as faces. (Considered to potentially be obnoxious/abused.)
Look into combining tabs, (drag one tab onto the other, only temporarily?) with the ability to separate them back (right click [or control-click] the conjoined tab?), as well as a "pop out" ability. Maybe a menu for right click, control click could be a shortcut to separate?
Links of interest:
http://stackoverflow.com/questions/60269/how-to-implement-draggable-tab-using-java-swing
http://docs.oracle.com/javase/tutorial/uiswing/components/menu.html#popup
SRL compatibility can come when they're done re-writing the site (or at least, the IRC/racebot portion of it).
Ensure that the bot works with just one viewer account (and assign the title appropriately, see the GUIMain todo) - making the todo of making a "viewer branch" solved once and for all.
Tagging this along with the new Account GUI, this manager will handle everything about connecting and joining channels. It'll be threaded to prevent any holdups or locks in the main GUI.
The new Account GUI (prototype currently in coding) will handle generating the OAuth (only once, so no worries about having to keep generating them) and will support playing Ads, changing your Title & Game, and will (possibly) support warning you about if people go live.
After you download the latest version 2.24 you get message there is a update, and you download it, and its still 2.24 and you get the update. And so on, and so on, and so on.
This needs to be an issue so I don't forget about it before merging into master :P
I'm fairly certain that you may be having the option added in for if one would want the time-stamps or not, but if not, then yea... other than that, have an option to choose what time format between 12h and 24h formats (don't know why I prefer military time m'self, liked it before I was in the military as it were LOL)
User-defined donation tiers can be used to change both the icon that the donor has in chat, as well as set specific sounds to play when donations of those calibers happen.
Each tier would have their own icon and or sound. For example, the current version of Botnak has 5 tiers by default:
$0.01 -> $9.99 = green
$10 -> $49.99 = bronze
$50 -> $99.99 = silver
$100 -> $499.99 = gold
$500+ = diamond
I plan to have users be able to define their own tiers in Episode 2's new Settings GUI.
The idea with sounds is:
Highest donation of the day: specific sound (or if not defined, use a random sound)
For each tier, the user can specify a specific sound, or just use a random one found in the directory.
Right now Botnak can just read the donation sound directory and play a random one when someone donates.
Recently, it has come to my attention that a !song command is needed, which I could add before the song request engine.
Normally, a problem is that people can use various websites for listening to music, and that I would need to implement a way for Botnak to detect what song you're currently playing.
To my surprise, I found someone on the OBS forums that has created a chrome plugin that listens for music to start playing, and parses the data. This plugin is called Untamed Now Playing Next and is nothing short of a miracle, as it's exactly what I needed.
To install it, you can follow this comment to set it up.
To have Botnak read from this file, edit the defaults.ini file in the "My Documents/Botnak/" folder, and provide the direct path to the file after the "NowPlayingFile=". For example, if I saved my now playing file in "C:\Users\Nick\Documents\unp\nowplaying.txt" , I would edit my defaults.ini to say:
MAKE SURE TO DOUBLE YOUR BACKSLASHES, AND PUT A BACKSLASH BEFORE THE ':' !!!
As Properties, which is what Botnak uses to load settings, prefers proper escaped filepaths. Don't worry, once you do it right the first time, Botnak will continue to load the right one, automatically.
The new Botnak Settings GUI will have a file selector for this, but for now a soft-implication is added.
Song requests will obviously keep track of the title of the song, but this feature is added for just listening to music right now.
I've noticed that some emotes pop up in the dev build you'd linked me, some things like "SSS" show the icon you've got set for that, as well as the creeper face icon for SSSsss. Perhaps make the trigger only work for when there's whitespace around the text?
Along the lines of the emotes stuff, I realize there's a TON of emotes programmed in already, perhaps an option in settings window to review the emotes that are in and allow turning on/off some by choice? (perhaps have tree listing of what channel they're for so it's not as long of a list initially)
Create a directory (folder) for sub sounds, and have botnak automatically read this folder on boot to set them, with the ability for "!setsubsound" to re-read the folder for any updates.
Similarly, Botnak could be able to do !addsound from a URL, where it downloads the sound file and stores it in the sound directory (making checks to see if it doesn't already exist, that is). !addsubsound could do the same, but downloads to the sub directory.
Tab combination/popout for multiple stream-viewing at once. Only temporary, but do save the combined tabs if they save & exit with a combined tab still active.
(I was thinking a HashMap of CombinedChatPanes or something)
setResizable(true); needs to be added back into GUIMain.
(For some people who use it as a viewer program, the tabs were not all showing up)
Look into PircbotX as the newer, updated engine could be better to support more tabs. WIll not be implemented in next release.
Voice recognization: http://cmusphinx.sourceforge.net/sphinx4/ Un-necessary
Pretty straight-forward, make the user define their bot's name, and make a final set of Strings for the commands.
Ex: Saying "Botnak, play keygasm" plays Keygasm
Permissions for Botnak's commands - to prevent/allow specific people/groups of people from completing a Botnak command. Done and added
!setpermission command int class OR String... names
Ex:
!setpermission mod 2 (Broadcaster only !mod command)
!setpermission mod gocnak,supermatmo (!mod only works for gocnak and matmo)
~~Keywords: HashMap of Strings that cause the text of a message to change to a certain Color.
By default, your main account's name is added to this, making the text orange. You can remove it, or change the color. This can also support Regexp.
Ex:
!addkeyword word red green blue
!changekeyword word new word? new red? new green? new blue?
!removekeyword word ~~ Done and added
User message color: This is almost like keywords, but for whenever a certain user types something, the color of their base text will be the specified color, unless they mention a Keyword. The default is white for everyone. Deemed too obnoxious
!setmessagecolor red green blue
Adding a listener for onBan(), so that we can see who gets banned. Cannot be done for Twitch chat.
Popout/combination of tabs
Viewer list (everyone in the chat for the channel)
!settitle and !setgame (this is going to radically change how Botnak logs in, and will require a generated client oauth, maybe a new settings GUI)
FrankerFaceZ support
Stats (viewer pb, viewers over time, viewer hotspots, etc)
This will prevent the stupid faces such as "A" or "Logo" or "Lose" etc from showing up.
Basically, I've seen some streamers using a new bot in development called "Deepbot", it's got a lot of capabilities within it that would be interesting to see in botnak. The deepbot dev crew don't have their project open source, and also don't have it openly downloadable (have to "donate" to possibly get it, and they don't really guarantee that you'd get it right away from what I'm reading).
it is able to keep track of the individuals within IRC time spent there, and with settings, gives people some "currency" (which the bot runner sets the name to if they want something special). It also supposedly has options to increase the gain of points depending on if the stream is live or not. The bot can hold drawings and stuff using these currency points as entries into the events.
Not sure if you've seen that bot in use or not though... not sure also if being that it's in closed development, how much you would be able to "copy" it's functionalities ...It would be great to use for giveaways
The version that is on here, when a link is linked in chat, botnak would respond with something along the lines of "unknown link, click at your own discression" or whatever it was. The version you'd linked no longer has it responding to the links.
Would be good to have it as an option to have botnak able to respond with whatever the page title is for whatever was linked.
Tab Pulsing is something implemented to show activity in channels, and it's kinda broken with Combined Chat Panes.
I also want implement pulsing for other buttons on the GUI, so I plan to expand support for Components in the future.
Much to my delight, Twitch announced the "Host Notification Message" update which sends a message whenever another person on Twitch starts hosting you.
However, there is a drawback. On TWITCHCLIENT 3, the following line is sent:
1407907705206 :jtv![email protected] PRIVMSG :(USER) is now hosting you for (X) viewers.
Notice that gap between PRIVMSG and the colon -- that's JTV private messaging with NO TARGET. The reason I'm on TWITCHCLIENT 3 is because jtv private messages the CHANNEL about info, for example:
1407907634683 :jtv![email protected] PRIVMSG _#gocnak_ :SPECIALUSER (USER) subscriber
which tells me who is a sub, and specifically, for what channel. With no target, Botnak has no way to determine if this is in someone else's channel or my own.
As for when the channel is hosting someone, jtv plays well:
1407908344732 :jtv![email protected] PRIVMSG #gocnak :HOSTTARGET (person being hosted)
So I can have notifications of if the channel is hosting someone else, but not when you're being hosted (yet).
I realize you're working on the whole UI Re-Design and all, but figured I'd bring this up due to it being around right now in 2.22. When in the settings page, when trying to fill in the information for the different accounts, pressing tab should go from the user name to the password field for that username... currently it goes from the main username to the bot username then over to the main password, and then over to the bot password.
If you close the window instead of clicking save and exit, it disposes the window but doesn't exit Botnak. To fix, either add a shutdown hook to clean everything up and make the default close operation EXIT_ON_CLOSE, or make the close button do nothing but add an event to exit properly. You can also probably take out the save and exit button since close should do that anyway.
Extra note: it's also an idea to make the options window modal so the main window can't be closed with that open.
In the current dev build of Botnak, there is an issue with name matching, specifically with names like KappaHD or any name with another emote inside of them. This produces the issue of having Kappa then a KappaHD right side by side.
A possible solution is to check whitespace/see if there's any other words around the face first, then apply the icon insert.
Another solution could be to ensure the face gets removed, which I don't think happens.
I realize that botnak is being made for use crazily on twitch stuff, and that's great. I know some people are going over to hitbox though if twitch keeps up the shenanigans (while others have already gone over there). Just didn't know if you'd thought about making a way to use their chat systems (haven't even looked to see if they have any API to even make this possible LOL ...
close this or delete it whenever you reply, I can see the response in e-mail if needed :D
The current BanQueue is a bit messy; if a user is banned from a channel it may show up right away or take forever, in both cases, the multitude of their ban (how many times banned) will be inaccurate.
I propose a new system for this, a manager thread that has a list of usernames, and will add (and reset the timer for) the user if it finds any more CLEARCHAT messages.
Allow the mods to start a poll that has options, and the users can use a !vote command to enter in a vote. This rids having to start a strawpoll or something.
Botnak can only have one poll at a time. Starting two polls would result in an error, and cause utmost confusion in chat.
Format could be as followed:
!startpoll (time limit) (Options...)
where
(time limit) is the parameter for how long before the poll expires and closes. Defaults to a minute.
(Options...) is a "]"-separated list of options to vote for.
Ex: !startpoll 2m Half-Life 2]Portal]Left 4 Dead]Just Code
would start a poll that lasts a minute and has the options
For a user to vote, they would simply type
!vote (num option)
So for the previous example, doing
!vote 1
would vote for Half-Life 2.
Users would be able to only vote for an option once, but could be able to change their vote, provided they do so before the poll is closed.
Anybody is allowed to vote in these, if you want sub only, make the chat sub only mode for it.
To get the results of a vote, a mod can type
!pollresult
to get the results.
For example, doing
!pollresult
would output the results to the poll:
"The result to the poll are:
Half-Life 2: 42/69 (60%)
Portal: 12/69 (17%)
Left 4 Dead: 10/69 (14%)
Just Code: 5/69 (7%)"
NOTE: If there was no time limit specified in creating the poll, Botnak will automatically output the winning result after a minute. Otherwise, Botnak will output the winning result after the specified time. Calling the result before the end will not close the poll.
If for some reason the options are messed up or you don't feel like having a poll anymore, a cancel would be as simple as:
!cancelpoll
Botnak will not output any of the results, and will stop taking votes for the poll.
Self explanatory. Add a slot in the new Settings GUI for the API key of the site, and have a heartbeat thread check every 5 or so seconds for a new donation.
Sort by IDs of the transaction, for when the first transaction is updated, and is a new ID of donation, update the user and the hashmap.
The idea is that it takes every comment in the chat and checks if there is question mark at the end and adds it to a new tab, that way when you are bored or doing nothing productive you can switch to question tab and read all the questions even after some time the answer may be still apriciated.
-Witusialdo from twitch
Apparently hitting Shift + Enter in the text field causes Botnak to override the "on Enter" press, and hiding a message in the field.
Simple fix of just checking if other keys are pressed or not.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.