<?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>DEV Community: svntax</title>
    <description>The latest articles on DEV Community by svntax (@svntax).</description>
    <link>https://dev.to/svntax</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%2F547356%2F03b83c06-2916-4a2f-9e94-072bf17f3f12.png</url>
      <title>DEV Community: svntax</title>
      <link>https://dev.to/svntax</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/svntax"/>
    <language>en</language>
    <item>
      <title>Playing Cards Discord Bot</title>
      <dc:creator>svntax</dc:creator>
      <pubDate>Sun, 10 Jan 2021 07:40:55 +0000</pubDate>
      <link>https://dev.to/svntax/playing-cards-discord-bot-gjh</link>
      <guid>https://dev.to/svntax/playing-cards-discord-bot-gjh</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;A Discord bot that lets users play with a standard 52-card deck of playing cards.&lt;/p&gt;

&lt;h3&gt;
  
  
  Category Submission:
&lt;/h3&gt;

&lt;p&gt;Random Roulette&lt;/p&gt;

&lt;h3&gt;
  
  
  App Link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://playing-cards-bot-rvpup.ondigitalocean.app/" rel="noopener noreferrer"&gt;https://playing-cards-bot-rvpup.ondigitalocean.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshots
&lt;/h3&gt;

&lt;p&gt;Drawing cards and changing the art style&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7o4n0w3u6bjnc3gfko0r.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7o4n0w3u6bjnc3gfko0r.gif" alt="Drawing cards"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Playing a game of High or Low&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fevxspftxijbdhxd8647g.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fevxspftxijbdhxd8647g.gif" alt="Game of High or Low"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;This bot gives Discord servers a deck of playing cards that anyone in the server can use. You can draw cards, shuffle the deck, change the art style of the cards, and play a game of High or Low with others.&lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/svntax/PlayingCardsBot" rel="noopener noreferrer"&gt;https://github.com/svntax/PlayingCardsBot&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License
&lt;/h3&gt;

&lt;p&gt;MIT&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;I've been using Discord for 4 years now, and seeing all the different kinds of bots out there made me want to try making my own. I've also been interested in learning Go for a while now, so making a Discord bot with Go seemed like a great project idea for me to learn from, and this hackathon was a good opportunity to do so.&lt;/p&gt;

&lt;h3&gt;
  
  
  How I built it
&lt;/h3&gt;

&lt;p&gt;The frontend is a simple, responsive landing page showing the bot's features and commands along with a button to add the bot to your own Discord servers. I used HTML and CSS only.&lt;/p&gt;

&lt;p&gt;The backend consists of the bot itself and the standard Go packages for hosting card images and the frontend website. I used the &lt;a href="https://github.com/bwmarrin/discordgo" rel="noopener noreferrer"&gt;DiscordGo&lt;/a&gt; package for the bot, which provides Go bindings for the Discord API.&lt;/p&gt;

&lt;p&gt;Since this was my first time using Go but not my first time making an app, I mainly had to learn language-specific things, like how to set up a Go project, how to use the &lt;code&gt;net/http&lt;/code&gt; package to serve files, and how to use goroutines to run multiple card games at a time. The DigitalOcean App Platform made the deployment process much easier for me because I didn't have to worry about building the app and figuring out how to run the build as a service on a Linux server.&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources/Info
&lt;/h3&gt;

&lt;p&gt;The two card image sets used are CC0 licensed (public domain) and come from Kenney. You can find them here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.kenney.nl/assets/boardgame-pack" rel="noopener noreferrer"&gt;https://www.kenney.nl/assets/boardgame-pack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.kenney.nl/assets/playing-cards-pack" rel="noopener noreferrer"&gt;https://www.kenney.nl/assets/playing-cards-pack&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>dohackathon</category>
      <category>go</category>
      <category>discord</category>
    </item>
  </channel>
</rss>
