4 ms·
Building Slack Bots for Fun: A Serverless Release Gong
- rvanmil 8y agoSlack bots are fun and pretty easy to build! We're running one on an rpi at the office which monitors our #travis channel for failed builds and then powers a revolving light for a couple seconds :) Small nitpick, the author should've used the `@slack/client` package though, `slack-node` is old and unmaintained.
- finaliteration 8y agoNice! I built something similar for AWS CodeBuild and ECS where we get channel notifications when builds start/succeed/fail and when ECS tasks start or die. It also shows who made the commit and what it relates to by pulling info from GitHub. I haven’t gone the flashing light route quite yet but I’ve considered it. Or maybe a loud noise directed at the developer who submitted the commit that caused the build to fail.
- dewey 8y agoJust what people need, more physical distractions in the office!
- cjsaylor 8y agoI've also created a slack bot for fun to allow slack teammates to play chess within slack: https://github.com/cjsaylor/chessbot https://github.com/cjsaylor/chessbot. The bot I built is a more traditional server setup, however I did briefly consider using a serverless setup for it. The serverless pipeline seems a lot more complex than the actual application to send the message to a slack channel. I wonder if things like Github's actions would replace the need to have a serverless thing for notifications of this kind (at least within the confines of Github's ecosystem).
- tptacek 8y agoThat's funny, I built the same thing for our Slack (I wish I'd known about notnil/chess; I tediously wrote out the rules for chess). I managed to do without assets, though, except for a typeface that had chess piece glyphs. :)
- cjsaylor 8y agoI first started down the text path, but not being able to "highlight" previous plays and check turned me towards generating graphics instead.
- tptacek 8y agoOh, it's not text; I render a PNG too. I just use the glyphs from the typeface for the pieces, and draw the board in code.
- cjsaylor 8y agoI think I tried the same thing, but shipping with the font included presented some licensing concerns. Also, I had a hard time getting it to line up exactly how I wanted, so ultimately I went on to assets.