<?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: Eileen</title>
    <description>The latest articles on DEV Community by Eileen (@eileenzhong).</description>
    <link>https://dev.to/eileenzhong</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%2F108025%2F7b67be4d-443a-42ae-824e-cb478dc0516b.jpeg</url>
      <title>DEV Community: Eileen</title>
      <link>https://dev.to/eileenzhong</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eileenzhong"/>
    <language>en</language>
    <item>
      <title>Text Yourself the NASA Picture of the Day with Standard Library and Node.js</title>
      <dc:creator>Eileen</dc:creator>
      <pubDate>Thu, 18 Oct 2018 07:00:56 +0000</pubDate>
      <link>https://dev.to/eileenzhong/text-yourself-the-nasa-picture-of-the-day-with-standard-library-and-nodejs-5bnh</link>
      <guid>https://dev.to/eileenzhong/text-yourself-the-nasa-picture-of-the-day-with-standard-library-and-nodejs-5bnh</guid>
      <description>&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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839937%2FAPoD%2F0_aUCLxxSlMh5V_aGH.jpg" 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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839937%2FAPoD%2F0_aUCLxxSlMh5V_aGH.jpg" alt="The APoD for 10/16/2018: Jupiter in Ultraviolet from HubbleMe"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Me: The sky is not the limit ☁️
Stranger: Pics or I don't believe you 🙄
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://medium.com/@eileenzhong/text-yourself-the-nasa-picture-of-the-day-with-standard-library-and-node-js-226f6ca48adc" rel="noopener noreferrer"&gt;Based on the above conversation, I'm going to show you how to get NASA's&lt;/a&gt; highly coveted &lt;strong&gt;Astronomy Picture of the Day&lt;/strong&gt; (APoD) with &lt;a href="https://www.stdlib.com" rel="noopener noreferrer"&gt;Standard Library&lt;/a&gt; 🌑 ⭐️ &lt;/p&gt;

&lt;p&gt;If you're not familiar with &lt;a href="https://www.stdlib.com" rel="noopener noreferrer"&gt;Standard Library&lt;/a&gt;, we're a serverless platform that enables everyone (yes, everyone! Calling all PMs, designers, marketing teams, sales people, oh and engineers… 🙋) to build, ship, and integrate scalable APIs in a matter of seconds. With the help of our online text editor, &lt;a href="https://code.xyz" rel="noopener noreferrer"&gt;Code.xyz&lt;/a&gt;, you can do all of this right from your browser.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Requirements&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.stdlib.com" rel="noopener noreferrer"&gt;Standard Library&lt;/a&gt; account (free)&lt;br&gt;
&lt;a href="https://api.nasa.gov/" rel="noopener noreferrer"&gt;NASA&lt;/a&gt; API key (free)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.stdlib.com" rel="noopener noreferrer"&gt;Standard Library&lt;/a&gt; provides a plethora of API templates that are readily usable. In order to retrieve the APoD API template, go to &lt;a href="https://code.xyz" rel="noopener noreferrer"&gt;Code.xyz&lt;/a&gt; and search for astronomy-picture-of-the-day by &lt;a class="mentioned-user" href="https://dev.to/eileenzhong"&gt;@eileenzhong&lt;/a&gt; 💁&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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_1.47.39_PM.png" 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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_1.47.39_PM.png" alt="APoD template"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Name your API:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_2.50.53_PM.png" 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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_2.50.53_PM.png" alt="Name your API"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One last step before sending the APoD to your phone!&lt;/p&gt;

&lt;p&gt;You'll need to properly configure the &lt;code&gt;env.json&lt;/code&gt; file. You'll notice that there are two sets of variables; however, we will be deploying our code to the dev environment, so we will only need to provide the dev variables.&lt;br&gt;
First, insert your Standard Library library token (&lt;code&gt;STDLIB_LIBRARY_TOKEN&lt;/code&gt;):&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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_2.53.21_PM.png" 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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_2.53.21_PM.png" alt="Right click to access this context menu"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, insert your &lt;a href="https://api.nasa.gov/" rel="noopener noreferrer"&gt;NASA API key&lt;/a&gt;. When finished, your &lt;code&gt;env.json&lt;/code&gt; file should look like this:&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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_2.52.33_PM.png" 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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_2.52.33_PM.png" alt="Completed env.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all the setup you have to do! &lt;/p&gt;

&lt;p&gt;To run the program, click "Debug" to bring the parameter input area into view. Enter your phone number, including the country code:&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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_3.01.34_PM.png" 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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839876%2FAPoD%2FScreen_Shot_2018-10-16_at_3.01.34_PM.png" alt="Don't forget the country code!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you click "Run", you'll receive NASA's astronomy picture of the day! 🚀&lt;/p&gt;

&lt;p&gt;That's not even the coolest part. &lt;/p&gt;

&lt;p&gt;We don't want to click "Run" every single day to get this text delivered to our phone. Thankfully, &lt;a href="https://www.stdlib.com" rel="noopener noreferrer"&gt;Standard Library&lt;/a&gt; has a task scheduler where you can customize a schedule to automagically invoke your newly created API. &lt;br&gt;
In &lt;a href="https://code.xyz" rel="noopener noreferrer"&gt;Code.xyz&lt;/a&gt;, click the "Tasks" tab. You can then enter a phone number and customize a schedule to your liking:&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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839877%2FAPoD%2FScreen_Shot_2018-10-16_at_3.19.34_PM.png" 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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839877%2FAPoD%2FScreen_Shot_2018-10-16_at_3.19.34_PM.png" alt="Create a scheduled task for your API"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Suggestion: schedule the task to execute once a day since APoD is an acronym for astronomy picture of the day, and hence, the picture won't change throughout the day.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When you're happy with the settings, click the blue "Schedule Task" button to schedule your API.&lt;br&gt;
That's it! If you know one ☝️, two ✌️, or five 🖐 other people who would appreciate a daily astronomy picture, you can schedule a different task (one for each phone number) for all of them. &lt;/p&gt;


&lt;h2&gt;
  
  
  &lt;strong&gt;Bonus section&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you've made it this far, you deserve a reward 🌈 Now, don't get too excited (actually - do get excited 🙃). With just 2 more lines of code, you can send your friend a random quote along with the APoD!&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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839918%2FAPoD%2FImage_from_iOS.png" 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%2Fres.cloudinary.com%2Feileenstdlib%2Fimage%2Fupload%2Fv1539839918%2FAPoD%2FImage_from_iOS.png" alt="APoD and a random Paul Jacques Grillo quote"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'll be using WordPress's API to pull a randomized quote: &lt;code&gt;http://quotesondesign.com/wp-json/posts?filter[orderby]=rand&amp;amp;filter[posts_per_page]=1&lt;/code&gt;. &lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;Don't worry about all the RegEx (regular expressions) sitting on line 12. The WordPress API just returns some HTML tags that won't play nicely in an MMS 📱&lt;/p&gt;

&lt;p&gt;Alternatively, you can just replace the value of the quote variable with any chunk of text you'd like to send your friend: &lt;code&gt;const quote = "Hi friend."&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Questions, comments, ideas? Feel free to email me at &lt;a href="mailto:eileen@stdlib.com"&gt;eileen@stdlib.com&lt;/a&gt;! I'd love to hear about your next project with &lt;a href="https://www.stdlib.com" rel="noopener noreferrer"&gt;Standard Library&lt;/a&gt; and &lt;a href="https://code.xyz" rel="noopener noreferrer"&gt;Code.xyz&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Eileen is a software engineer at &lt;a href="https://www.stdlib.com" rel="noopener noreferrer"&gt;Standard Library&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>showdev</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Build a Reddit Moderator Bot With Standard Library + Code.xyz in 10 Minutes</title>
      <dc:creator>Eileen</dc:creator>
      <pubDate>Tue, 16 Oct 2018 07:04:33 +0000</pubDate>
      <link>https://dev.to/eileenzhong/build-a-reddit-moderator-bot-with-standard-library--codexyz-in-10minutes-1gei</link>
      <guid>https://dev.to/eileenzhong/build-a-reddit-moderator-bot-with-standard-library--codexyz-in-10minutes-1gei</guid>
      <description>&lt;p&gt;&lt;a href="https://medium.com/@eileenzhong/build-a-reddit-moderator-bot-with-standard-library-code-xyz-in-10-minutes-d85d878d4a0d"&gt;If you're a subreddit moderator, chances are you've received requests&lt;/a&gt; from community members to delete an inappropriate comment or ban an ill-mannered user. But it's 2018 going on 2019 - we're in the midst of the biggest tech era and spoiled with things like AI, automation and bots. We no longer need to perform menial tasks like monitoring subreddits. Instead, I'll teach you in 3 easy steps how to build a Reddit bot that will automatically check a subreddit for flagged comments. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LEQ5mFzd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539630949/Screen_Shot_2018-10-12_at_3.52.34_PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LEQ5mFzd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539630949/Screen_Shot_2018-10-12_at_3.52.34_PM.png" alt='Community members can use "!delete" or "!ban" to request bot moderation'&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whether you have no programming knowledge or 15 years of professional experience, you'll be able to deploy this bot with &lt;a href="https://www.stdlib.com"&gt;Standard Library&lt;/a&gt; in under 10 minutes.&lt;/p&gt;

&lt;p&gt;If you're not familiar with &lt;a href="https://www.stdlib.com"&gt;Standard Library&lt;/a&gt;, we're a serverless platform that enables &lt;strong&gt;everyone&lt;/strong&gt; (yes, &lt;em&gt;everyone&lt;/em&gt;! Calling all PMs, designers, marketing teams, sales people, oh and engineers… 🙋) to build, ship, and integrate scalable APIs in a matter of seconds. With the help of our online editor, &lt;a href="https://code.xyz"&gt;Code.xyz&lt;/a&gt;, you can do all of this right from your browser. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mo4WnrHV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631205/standard-library-logo-dark.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mo4WnrHV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631205/standard-library-logo-dark.png" alt="Standard Library"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Requirements&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.reddit.com"&gt;Reddit&lt;/a&gt; moderator account (for the subreddit you'd like to monitor)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.stdlib.com"&gt;Standard Library&lt;/a&gt; account (free)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Step 1: Get Reddit bot template&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Estimated time: 30 seconds&lt;/em&gt;&lt;br&gt;
Head over to &lt;a href="https://code.xyz"&gt;Code.xyz&lt;/a&gt; in your browser and select &lt;code&gt;reddit-moderator-bot by @eileenzhong&lt;/code&gt; (that's me! 🤓👋) in the Community API Sources tab:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_5O8pq3B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631295/Screen_Shot_2018-10-11_at_3.01.12_PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_5O8pq3B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631295/Screen_Shot_2018-10-11_at_3.01.12_PM.png" alt='Select "reddit-moderator-bot" by @eileenzhong'&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Name your API:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---1Z3f4z7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631296/Screen_Shot_2018-10-11_at_3.03.43_PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---1Z3f4z7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631296/Screen_Shot_2018-10-11_at_3.03.43_PM.png" alt="Name your API"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once done, you'll conveniently land in &lt;a href="https://code.xyz"&gt;Code.xyz&lt;/a&gt; (Standard Library's in-browser text editor) with the Reddit bot project code. &lt;/p&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;Step 2: Copy and paste&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Estimated time: 2-5 minutes&lt;/em&gt;&lt;br&gt;
This next step involves expert knowledge of the copy-and-paste skill to set some required environment variables. You'll notice there are three sets of variables listed in your &lt;code&gt;env.json&lt;/code&gt; file: &lt;code&gt;local&lt;/code&gt;, &lt;code&gt;dev&lt;/code&gt;, and &lt;code&gt;release&lt;/code&gt;. We'll be deploying our code to the dev environment, so we only need to worry about the &lt;code&gt;dev&lt;/code&gt; variables for this tutorial! &lt;/p&gt;

&lt;p&gt;All fields are found in &lt;code&gt;env.json&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zQ5aX2FO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631377/Screen_Shot_2018-10-11_at_3.13.11_PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zQ5aX2FO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631377/Screen_Shot_2018-10-11_at_3.13.11_PM.png" alt="Open env.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To retrieve your &lt;code&gt;STDLIB_LIBRARY_TOKEN&lt;/code&gt;, right click between the quotation marks and select "Insert Library Token…":&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7fR7IU4E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631453/Screen_Shot_2018-10-12_at_3.09.06_PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7fR7IU4E--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631453/Screen_Shot_2018-10-12_at_3.09.06_PM.png" alt="Insert library token by accessing the context menu"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Keys prefaced with &lt;code&gt;REDDIT_&lt;/code&gt;-* can be found on &lt;a href="https://www.reddit.com/prefs/apps"&gt;Reddit&lt;/a&gt; (&lt;code&gt;REDDIT_USERNAME&lt;/code&gt; and &lt;code&gt;REDDIT_PASSWORD&lt;/code&gt; are your moderator account's username and password, respectively).&lt;br&gt;
If you don't already have a Reddit app, register for one &lt;a href="https://www.reddit.com/prefs/apps"&gt;here&lt;/a&gt; with your moderator account:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QmZQfa51--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631551/1_5TGHBJGNptiFxHs3oyDaqw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QmZQfa51--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631551/1_5TGHBJGNptiFxHs3oyDaqw.png" alt="Register a Reddit app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the &lt;code&gt;REDDIT_CLIENT_ID&lt;/code&gt; and &lt;code&gt;REDDIT_SECRET_KEY&lt;/code&gt;:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ujCDBx1d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631581/Screen_Shot_2018-10-11_at_3.25.50_PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ujCDBx1d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631581/Screen_Shot_2018-10-11_at_3.25.50_PM.png" alt="Click edit to view private Reddit credentials"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XGSJxVNP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631581/Screen_Shot_2018-10-11_at_3.26.04_PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XGSJxVNP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631581/Screen_Shot_2018-10-11_at_3.26.04_PM.png" alt="Retrieve your REDDIT_CLIENT_ID and REDDIT_SECRET_KEY"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paste both into &lt;code&gt;env.json&lt;/code&gt;:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RrIZj5Sq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539660124/Screen_Shot_2018-10-15_at_8.17.21_PM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RrIZj5Sq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539660124/Screen_Shot_2018-10-15_at_8.17.21_PM.png" alt="Filled out env.json"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When your &lt;code&gt;env.json&lt;/code&gt; file is properly filled out like the above screenshot, the bot is ready for some preliminary testing. &lt;br&gt;
Fill out the required parameters (definitions and screenshots below):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**Parameter definitions**

subreddit: the name of the subreddit you are moderating
threshold: what score do you want the comment to have in order to perform the requested action? 
allowBanPermission: true (allow ban requests) / false (ignore ban requests)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LLrFOs9a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631711/Screen_Shot_2018-10-12_at_9.27.26_AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LLrFOs9a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631711/Screen_Shot_2018-10-12_at_9.27.26_AM.png" alt="Click Debug to launch the parameter editor"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then click the "Run" button, which will do 2 things: &lt;em&gt;execute&lt;/em&gt; and &lt;em&gt;deploy&lt;/em&gt; the program.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U0TTPy1c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631711/Screen_Shot_2018-10-12_at_9.44.16_AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U0TTPy1c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631711/Screen_Shot_2018-10-12_at_9.44.16_AM.png" alt="Custom parameters"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations, you've deployed an API to Standard Library! 😎 🎉 🎊&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Step 3: Set it and forget it&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Estimated time: 1 minute&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U0TTPy1c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631711/Screen_Shot_2018-10-12_at_9.44.16_AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U0TTPy1c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631711/Screen_Shot_2018-10-12_at_9.44.16_AM.png" alt="Customize the task schedule"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yFmhSJF6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631781/Screen_Shot_2018-10-12_at_9.57.31_AM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yFmhSJF6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/eileenstdlib/image/upload/v1539631781/Screen_Shot_2018-10-12_at_9.57.31_AM.png" alt="Schedule the task"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The final step is to put your bot to work. You can do this in &lt;a href="https://code.xyz"&gt;Code.xyz&lt;/a&gt; by scheduling a task, which will automatically execute the API you just created according to the schedule you choose.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Suggestion: depending on subreddit traffic, you might increase or decrease the frequency of bot invocation. A good start is to have the bot do a scan once every 5 minutes.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Once you click the "Schedule Task" button in the bottom right corner, your Reddit bot will scan &lt;code&gt;r/{subreddit}&lt;/code&gt; to &lt;strong&gt;reply to any new !ban/!delete requests&lt;/strong&gt; and &lt;strong&gt;perform these tasks on any comments that meet the score threshold&lt;/strong&gt; according to the schedule you have chosen.&lt;/p&gt;

&lt;p&gt;That's it! 🌟 Now imagine… if it was this quick and painless to deploy a Reddit moderator bot, what else can &lt;a href="https://www.stdlib.com"&gt;Standard Library&lt;/a&gt; do for you? Feel free to reach out with any ideas or questions: &lt;strong&gt;&lt;a href="mailto:eileen@stdlib.com"&gt;eileen@stdlib.com&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Eileen is a software engineer at Standard Library.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
