<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Nik O'Donnell</title>
    <description>The latest articles on Forem by Nik O'Donnell (@fullstackpapa).</description>
    <link>https://forem.com/fullstackpapa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F261291%2Fdd97f310-1649-4aec-bc5b-abace754675c.jpg</url>
      <title>Forem: Nik O'Donnell</title>
      <link>https://forem.com/fullstackpapa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/fullstackpapa"/>
    <language>en</language>
    <item>
      <title>Creating our first worker/chat-bot HAL</title>
      <dc:creator>Nik O'Donnell</dc:creator>
      <pubDate>Wed, 30 Oct 2019 20:39:10 +0000</pubDate>
      <link>https://forem.com/fullstackpapa/creating-our-first-worker-chat-bot-hal-3n6a</link>
      <guid>https://forem.com/fullstackpapa/creating-our-first-worker-chat-bot-hal-3n6a</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yETmFob0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ytimg.com/vi/mvLgvychb18/maxresdefault.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yETmFob0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ytimg.com/vi/mvLgvychb18/maxresdefault.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember when bots were becoming popular? Described as the new 'Apps', well the steam kind of ran out of that engine. But when they were the new hotness - of course we decided we had to have one, like right now!&lt;/p&gt;

&lt;p&gt;Whilst they are quite fun to play around with, our bot has actually been a great inclusion in team workflows, communications and task automation.&lt;/p&gt;

&lt;p&gt;So when we set to work...by that I mean we did a little 'bot shopping' and found the perfect candidate to suit our needs, meet Hedwig IM.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AaNE_qDa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://iwmn.me/o7qpcn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AaNE_qDa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://iwmn.me/o7qpcn.png" alt="Hedwig IM"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a quick:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone git@github.com:hedwig-im/hedwig_xmpp.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We were on our way, with the tedious foundational templating already done for us!&lt;/p&gt;

&lt;h3&gt;
  
  
  Open Source FTW \0/ Thank you &lt;a href="https://github.com/scrogson"&gt;Sonny&lt;/a&gt;!!!
&lt;/h3&gt;

&lt;p&gt;Then we set to actual work on integrating Hedwig within our communication channels on #Slack so it can start doing...&lt;/p&gt;

&lt;p&gt;ALL THE THINGS!&lt;/p&gt;

&lt;p&gt;We soon discovered it came with a fun little function out of the box to demonstrate how to code interactions, when you type "great success" in an active channel, the bot replies with a random image of Borat:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qYHCq9xn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://s2.quickmeme.com/img/13/1324dfd733535e58dba70264e6d05c9b70346204d2cacef65abef9c702746d1c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qYHCq9xn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://s2.quickmeme.com/img/13/1324dfd733535e58dba70264e6d05c9b70346204d2cacef65abef9c702746d1c.jpg" alt="Great Success"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We named our bot HAL9000 (Hal for short) - &lt;del&gt;some&lt;/del&gt; &lt;del&gt;many&lt;/del&gt; ALL of you will recognize the name straight away from the Sci-Fi classic Space Odyssey 2001 and 2010. I know what you're thinking, why the fudge sticks would we name our bot after this terrifying AI character from the past - well it just kinda happened, and yes as an aside our main developer on the project is named Dave (can't make that stuff up).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JdchtRY_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://cdn.wallpapersafari.com/43/34/l7suUd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JdchtRY_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://cdn.wallpapersafari.com/43/34/l7suUd.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Though we figure we're safe enough here on Earth with our Halbot - there aren't any airlocks to lock or escape pods to trap us in.&lt;/p&gt;

&lt;p&gt;As we got to know Hal a bit better, we taught it quite a few extra features. As soon as someone on the team thinks, 'this is annoying, can't we automate it!' we can respond, 'well yes team member, we can'.&lt;/p&gt;

&lt;h3&gt;
  
  
  Right now Hal can do the following:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Automate the creation of team meetings via Zoom's API &lt;code&gt;!meeting&lt;/code&gt; or one on one chats &lt;code&gt;!zoom @&amp;lt;person&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Do WHOIS domain lookups via the root servers &lt;code&gt;!whois dev.to&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Send a unique SMS code or message to a user &lt;code&gt;!sms message: +17788997766  Hi, I am from iwantmyname, emails to your account are bouncing back...&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Check which developer is on call &lt;code&gt;!who is on call?&lt;/code&gt;, and notify them of something &lt;code&gt;!page &amp;lt;your_message_for_oncall&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Hal sanity check...&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L5CaBXEM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://iwmn.me/tg7ZEm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L5CaBXEM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://iwmn.me/tg7ZEm.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Some things we would like to teach Hal how to do:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Check the site speed &lt;code&gt;!site speed&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run a search query on the site &lt;code&gt;!search is-hal9000-evil.io&lt;/code&gt; &amp;amp; check the 'happy path' (from search through to checkout) to make sure things are A-OK &lt;code&gt;!happypath&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Query dig commands - &lt;code&gt;!dig dev.to&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Order beer and pizza for the next hackathon &lt;code&gt;!pizza+beer &amp;lt;how many: i.e beer:10 pizza:10&amp;gt; &amp;lt;when: i.e NOW!&amp;gt; &amp;lt;delivery address&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Soon, Oh yes...Very soon!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T6861d4_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://2.bp.blogspot.com/-O4GYXuQEuV8/VVqwwQwQG8I/AAAAAAAACRw/eXfUg1upE44/s640/mr-burns-wallpaper-gif-scaled1000.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T6861d4_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://2.bp.blogspot.com/-O4GYXuQEuV8/VVqwwQwQG8I/AAAAAAAACRw/eXfUg1upE44/s640/mr-burns-wallpaper-gif-scaled1000.jpg" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>elixir</category>
      <category>bot</category>
      <category>slack</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
