8 ms·
Slack Poker Bot
- ezarowny 11y agoWould you be open to a PR adding HipChat support?
- CharlieHess 11y agoCertainly not opposed; it's pretty tightly coupled to the Slack API, though.
- purephase 11y agoWhile not a poker player, I can't help respect the why-the-fuck-not? aspect of this. Very cool.
- thomasfromcdnjs 11y agoThis is so good, I got it working in less than a minute. My team is going to have a blast with this.
- jakejake 11y agoCool! Do you have a public server that's running the bot, or do you just run it on your local machine?
- CharlieHess 11y agoYou can deploy via Heroku now, thanks to gangstead.
- lotyrin 11y agoThe attention to detail in spec output is exemplary. Uploading to Imgur for displaying card images to users seems like a strange choice, though. Why not have the bot serve its own images up over HTTP and attach URLs to itself? I could even imagine a badges.io style image preparation microservice that could be shared by several playing-card based bot apps.
- deleted 11y ago[deleted]
- GauntletWizard 11y agoPossibly because running a bot client is much different from running a webserver. Dialing outbound to connect to slack is much easier than figuring out or configuring your own canonical URL, opening ports, etc. On the other hand, preparing hands as a single image seems a bad way of doing this; Does the slack API only allow a single image per conversation? I agree with your preparation microservice idea - There should be (and probably are several) a service that allows you to specify a poker hand as a query string and get back an image of the hand. More simply, though: A webfont and https://en.wikipedia.org/wiki/Playing_cards_in_Unicode https://en.wikipedia.org/wiki/Playing_cards_in_Unicode
- OJFord 11y ago> preparing hands as a single image seems a bad way of doing this I don't believe there's another way to display them inline?
- TazeTSchnitzel 11y agoAre images even necessary, anyway? Unicode has playing card codepoints (the full 52) and playing card house codepoints (️, ️, ️, ️). Edit: What the hell? Hacker News stripped the Unicode characters?! https://news.ycombinator.com/item?id=10156894 https://news.ycombinator.com/item?id=10156894
- CharlieHess 11y agoYou can't control the font rendering in Slack (it's Lato, at a certain size). The Unicode cards are far too small to read.
- vinothgopi 11y agoFeature request: zenpayroll integration
- ljk 11y agois there a way to spin it so it'll be legal in the US?
- slg 11y agoIt varies by state, but home poker games often aren't expressly illegal. The illegal aspect is often profiting off of running the poker game. As long as you don't implement a rake into the system and you are paying out the entire pot, you are probably good from a legal perspective although IANAL.
- FireBeyond 11y agoWhen I played poker at MSFT in WA state, another rule was that you couldn't bet truly blind. You had to at least look at your cards. To see your cards and bet was a 'game of skill', to not was 'gambling'.
- kelnos 11y agoSo you couldn't play a game like Hold 'em that requires a small and big blind? Or anything requiring pre-deal antes?
- mathrawka 11y agoIf you remove the antes in poker, then it is no longer a game of skill. The only reason to make a bet is because of the antes, otherwise you will only play AA, as should everyone else.
- an4rchy 11y agoThat's what gives away the tell... I'd say reading people is probably the more relevant skill than counting odds...
- hmate9 11y agoRequest: Battleship for Slack
- an4rchy 11y agoYes! Also, this might be a new genre of slack integrations.. games.... :lightbulb:
- lfowles 11y agoJust copy the countless IRC game bots :)
- latj 11y agoI have never used slack. How is it different than IRC?
- readymade 11y agoIRC doesn't have a 3 billion dollar valuation.
- 91bananas 11y agoJust a way better interface on it. Searchable history, multiple rooms inside rooms effectively. File sharing, lots of niceties that are probably possible in IRC but would take a lot of work. It has changed the way our team communicates, for me I am the only remote guy on a team of 6ish devs. I can pick and choose my hours, work when other guys are off, and still see all the comms that happened while I wasn't at my machine.
- aaron-lebo 11y ago> I can pick and choose my hours, work when other guys are off, and still see all the comms that happened while I wasn't at my machine. I'm sure are features IRC cannot duplicate, but all that's necessary for that is a bouncer.
- 11y ago
- spelunker 11y agoFeature request! HipChat integration! Shoot, I'll just do it myself.
- gdubya 11y agoHurry up then
- gbin 11y agowhy not use a generic chatbot like errbot (http://errbot.net http://errbot.net [shameless plug alert]) and get all the backends (hipchat, IRC, XMPP etc...) for free ? there are existing poker AIs in python to integrate with: https://github.com/mikaelbr/AI-Poker-Player https://github.com/mikaelbr/AI-Poker-Player
- CharlieHess 11y agoBecause the fun part was writing the game logic, not the glue code. ;)
- gbin 11y agoit was re:the comment, not the OP. I totally understand :)
- AlexSolution 11y agoFeature request: bitcoin integration
- kordless 11y agoMy thought exactly. But first, I'm containerizing it.
- 0xCMP 11y agoWatch, soon we'll see articles about how "Slack built a platform..." and how the next big things are games for slack /s
- bbcbasic 11y agoOr how Slack, like Facebook gets banned at many workplaces.
- pg_is_a_butt 11y agomore like imgur bans slack
- 0xCMP 11y agoThis is pretty awesome though. I got a list of games I want to make for our Python bot. Number guess, blackjack, this, now maybe battleship...
- Wingman4l7 11y agoThe title confused me for a minute. In IRC chat circles, "bot" means a persistent software entity running in the channel, performing some task. In online poker circles, "bot" means software that automatically plays for you.
- pavel_lishin 11y agoThis has support for both!
- companyhen 11y agoAs a new dev: How do I get npm install to run? I'm on step 4 of the instructions.
- kelyvin 11y agoMake sure you have node and npm installed on your machine. (You can check by running "npm -v" from the command line, if you don't see anything, then take a quick google search on how to install it). Run "npm install" in the folder directory where the package.json is visible. In this case, if you cloned or extracted this project, it would be in the slack-poker-bot folder. Hope that helps!
- companyhen 11y agoFigured it out myself! Thanks :)
- bombtrack 11y agoNPM is the Node Package Manager. So, you must have node installed to get npm. https://nodejs.org/download/ https://nodejs.org/download/
- julbaxter 11y agoRequest: Planning poker integration to vote for story point
- d2xdy2 11y agoThis is pretty neat. I just hope no one gets in trouble at work playing poker.
- ykumar6 11y agoInstalled 30 minutes ago, entire team hooked
- cpr 11y agoNifty! Why not define a bunch of custom emoji, one for each card, and use those instead of the big graphics at each turn? Would save massive bandwidth.
- CharlieHess 11y agoTotally considered this early on but wanted to stick to card images to add to the authenticity. Might expose this as an option later on, though.
- im3w1l 11y agoThere are unicodes for the cards, e.g. 🂶🃆. Does slack support color text?
- orky56 11y agoSlack off with some poker!
- genericacct 11y agoGreat I was just looking for something to feed to my machine learning thesis.
- awinder 11y agoVery cool! Threw together a quick docker image if anyone finds it useful https://hub.docker.com/r/awinder/slack-poker-bot/ https://hub.docker.com/r/awinder/slack-poker-bot/
- Yhippa 11y agoSuper awesome! A few buddies and I use TriviaBot. So much fun. Can't wait to install this.
- flakmonkey 11y agoAm I correct in saying that the shuffle algorithm is flawed? It looks to me like it swaps each card iteratively with a random card in the deck. This means that some cards are likely shuffled more times that others, and some sequences are then more common than others. https://github.com/CharlieHess/slack-poker-bot/blob/master/src/deck.js https://github.com/CharlieHess/slack-poker-bot/blob/master/s...
- ajkjk 11y agoYes, you're correct. It should swap with cards that are strictly at later positions in the deck: Deck.getRandomInt(index+1, numberOfCards) instead of Deck.getRandomInt(0, numberOfCards)
- CharlieHess 11y agoThanks for spotting that! Fixed here: https://github.com/CharlieHess/slack-poker-bot/commit/332f393ac7527800036ca24bf5b76d84af531a41 https://github.com/CharlieHess/slack-poker-bot/commit/332f39...
- avree 11y agoSince you already have the card images, any chance of having it deal actual card images versus the abbreviated format? I can look into doing this myself and submitting a PR after I get home, as well.
- CharlieHess 11y agoAre you talking about the hole cards that are DM'ed to you? That's a good suggestion; feel free to file an issue.
- shultays 11y agoDoes this add a bias though? If I took first card in deck and swap it a hundred times more than others how would that make a difference?
- 11y ago
- a_t48 11y agoTried it - it crashed for both games we tried. Then again, installing node on my box was a mess - we have some sort of proxy on apt-get that insisted on installing an old version. I probably screwed up somehow. Edit: https://github.com/CharlieHess/slack-poker-bot/issues/14 https://github.com/CharlieHess/slack-poker-bot/issues/14 https://github.com/CharlieHess/slack-poker-bot/issues/22 https://github.com/CharlieHess/slack-poker-bot/issues/22 Glad I'm not the only one.
- CharlieHess 11y agoWrote up a workaround until I can fix it properly.
- Pwntastic 11y agoI can't seem to get it installed on windows 8.1... The lwip package in one of the other dependencies fails to build :( sad day
- CharlieHess 11y agoDoes the Heroku deploy work for you?
- Pwntastic 11y agoThe Heroku deploy does appear to work, but I was hoping to get it all running locally. Thanks though! It looks like there's a ticket on the lwip project on github that is similar to my issue, so hopefully they'll resolve that soon enough :)
- kordless 11y agoI've ported this to run on Giant Swarm: https://github.com/giantswarm/swarm-holdem https://github.com/giantswarm/swarm-holdem. That repo also supports running it locally in a container.
- disillusioned 11y agoHoping someone does this with chess, too!
- binaryblitz 11y agoAnyone having an issue with npm doing this: FATAL ERROR: JS Allocation failed - process out of memory
- deeteecee 11y agoid love it if i can do this in only private chat lol
- samirez 11y ago@Charlie - How do I get in this SF Utes slack channel? :) Go Utes!