<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Video-Games - Stuart Jones]]></title><description><![CDATA[Designs & Code]]></description><link>https://stuart-jones.com/</link><image><url>https://stuart-jones.com/favicon.png</url><title>Video-Games - Stuart Jones</title><link>https://stuart-jones.com/</link></image><generator>Ghost 3.13</generator><lastBuildDate>Sat, 12 Apr 2025 04:27:34 GMT</lastBuildDate><atom:link href="https://stuart-jones.com/tag/video-games/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Steam Storefront Slackbot: Gabe]]></title><description><![CDATA[Gabe is a simple Slack bot for searching the Steam storefront. When a user inputs the '/steam' command along with a game title, Gabe will reply with a brief summary of the game, along with a link to the game's Steam page.]]></description><link>https://stuart-jones.com/blog/steam-storefront-slackbot-gabe/</link><guid isPermaLink="false">5e913bf4017a114be0c96059</guid><category><![CDATA[Projects]]></category><category><![CDATA[Video-Games]]></category><dc:creator><![CDATA[Stuart Jones]]></dc:creator><pubDate>Tue, 10 May 2016 23:56:00 GMT</pubDate><media:content url="https://stuart-jones.com/content/images/2020/04/Gabe-1.png" medium="image"/><content:encoded><![CDATA[<figure class="kg-card kg-image-card"><img src="https://stuart-jones.com/content/images/2020/04/Gabe.png" class="kg-image" alt="Steam Storefront Slackbot: Gabe"></figure><!--kg-card-begin: markdown--><img src="https://stuart-jones.com/content/images/2020/04/Gabe-1.png" alt="Steam Storefront Slackbot: Gabe"><p><a href="https://github.com/ImStuBTW/gabe">Gabe</a> is a simple Slack bot for searching the Steam storefront. When a user inputs the '/steam' command along with a game title, Gabe will reply with a brief summary of the game, along with a link to the game's Steam page.</p>
<h2 id="requirements">Requirements</h2>
<p>This Slack bot is a NodeJS app. It's got a few dependencies, which it fetches through npm. Gabe uses Express to route Slack commands. The Steam store data is fetched through NAME's excellent <a href="https://www.npmjs.com/package/steamstore">steam-store</a> utility. Steam technically doesn't have an API for the online store, steam-store is using an undocumented API Steam uses for the Big Picture mode. This API doesn't have a search functionality, so Gabe has to download the entire app list when it first runs. This list is stored in a sqlite3 database, and is updated using the <a href="https://www.npmjs.com/package/cron">cron</a> package at midnight and noon.</p>
<p>I've also included a Procfile in this repository. You can run Gabe anywhere, but Slack requires apps using /slash commands to be hosted on a server with SSL. Heroku makes an ideal place since they provide SSL out of the box.</p>
<h2 id="slackconfiguration">Slack Configuration</h2>
<p>You'll need to set up two Custom Integrations in Slack. First create a Slash Command with <code>/steam</code> for the command, <code>https://YourServer.com/steam</code> for the URL, POST for the Method, and whatever Name and Icon you'd like. Next, create a an Incoming Webhook. Set the Channel to the channel you'd like the command to work in, and then conigure the name and icon with the same name and icon as you used for the Slash Command.</p>
<p>Steambot.js needs to use the Incoming Webhook URL in the send() function. You'll either need to insert everything after <code>https://hooks.slack.com/services</code> as a variable into the source code (including the <code>/</code> character), or you'll need to set your system's <code>process.env.INCOMING_WEBHOOK_PATH</code> to that same variable.</p>
<h2 id="buildandrun">Build and Run</h2>
<p>Gabe's build process is fairly standard. <code>npm install</code>, then <code>node app</code>. If you're going to run Gabe on Heroku, commit the code to a local git repository, then run <code>heroku create</code> and <code>git push heroku master</code>. You'll also have to set Heroku's config vars to have <code>INCOMING_WEBHOOK_PATH</code> set to your Slack's incoming webhook path variable. This can be done through Heroku's web console, or through the command <code>heroku config:set INCOMING_WEBHOOK_PATH=[Everything after &quot;https://hooks.slack.com/services&quot; in Slack's Incoming Webhook URL]</code>.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>