<?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: Jasper Stephenson</title>
    <description>The latest articles on DEV Community by Jasper Stephenson (@midblue).</description>
    <link>https://dev.to/midblue</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%2F61464%2Fd600160b-bf01-4d46-acda-dd1323bf8017.jpeg</url>
      <title>DEV Community: Jasper Stephenson</title>
      <link>https://dev.to/midblue</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/midblue"/>
    <language>en</language>
    <item>
      <title>Introducing: Timezone Bot for Discord!</title>
      <dc:creator>Jasper Stephenson</dc:creator>
      <pubDate>Wed, 17 Jun 2020 05:46:48 +0000</pubDate>
      <link>https://dev.to/midblue/introducing-timezone-bot-for-discord-1i16</link>
      <guid>https://dev.to/midblue/introducing-timezone-bot-for-discord-1i16</guid>
      <description>&lt;h1&gt;
  
  
  It's finally live!
&lt;/h1&gt;

&lt;p&gt;Last year, I made a simple timezone bot for Discord.&lt;/p&gt;

&lt;p&gt;My school friends and I had been living increasingly remotely since we all graduated, and it was getting harder and harder to track who would be awake when, and when you could expect a response from someone. So, I got to work making a simple tool that would allow users to set their timezone, and then passively and unobtrusively notify users of their partner's local time when they were talking to someone in another timezone.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yh_rx3Wb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jasperstephenson.com/posts/timezonebot/full/1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yh_rx3Wb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jasperstephenson.com/posts/timezonebot/full/1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a year of running a single-server version and getting dozens of emails from interested server owners looking to use the bot on their own server, &lt;strong&gt;I finally made a live version that anyone can add!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://discord.com/api/oauth2/authorize?client_id=437598259330940939&amp;amp;permissions=68672&amp;amp;scope=bot"&gt;Click here to add it to your server!&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LZMnuuO7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jasperstephenson.com/posts/timezonebot/full/4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LZMnuuO7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jasperstephenson.com/posts/timezonebot/full/4.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
I also implemented natural-language and fuzzy search using fuse.js and Google's geolocation API to make sure that you don't need to type usernames or location names perfectly every time.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nTKUvnBn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jasperstephenson.com/posts/timezonebot/full/2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nTKUvnBn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.jasperstephenson.com/posts/timezonebot/full/2.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
This version uses discord.js on top of Firebase and Heroku, all of which are highly recommended if you're interested in making your own Discord bot.  &lt;/p&gt;

&lt;p&gt;If you're interested, &lt;a href="https://discord.com/api/oauth2/authorize?client_id=437598259330940939&amp;amp;permissions=68672&amp;amp;scope=bot"&gt;add it to your server!&lt;/a&gt;&lt;br&gt;
Also, let me know if you have any questions about Discord bot development.&lt;/p&gt;

&lt;p&gt;You can read more about this project &lt;a href="https://www.jasperstephenson.com/posts/timezonebot/"&gt;here&lt;/a&gt;, and have a great day! :)&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>showdev</category>
      <category>ux</category>
      <category>discord</category>
    </item>
    <item>
      <title>I Made a Discord Bot to Keep Hate Speech OUT of Your Server... And Everyone Else's!</title>
      <dc:creator>Jasper Stephenson</dc:creator>
      <pubDate>Mon, 12 Aug 2019 04:38:27 +0000</pubDate>
      <link>https://dev.to/midblue/i-made-a-discord-bot-to-keep-hate-speech-out-of-your-server-and-everyone-else-s-53</link>
      <guid>https://dev.to/midblue/i-made-a-discord-bot-to-keep-hate-speech-out-of-your-server-and-everyone-else-s-53</guid>
      <description>&lt;p&gt;&lt;a href="https://discordapp.com/oauth2/authorize?client_id=605039242309140483&amp;amp;scope=bot&amp;amp;permissions=76800" rel="noopener noreferrer"&gt;Add Safespace to your server!&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;"Go back to where you came from" is dominating headlines as I write this post; it seems like unabashed vitriol and prejudice is in fashion in the late '10s. I get sad reading the news lately, and when I get sad about a situation, I want to make things to change it. So, I built a bot that tracks hate speech and hate speech users across the whole Discord platform.  &lt;/p&gt;




&lt;p&gt;I was recently inspired by a Reddit bot.  &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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2Fa.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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2Fa.jpg" alt="Reddit bot"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;It searches through any given user's comment history on Reddit for the N word, and calls them out publicly. I thought this was a fantastic idea. In order to make a tolerant, accepting community, it's important to hold people accountable for their words and to make a clear statement that hate speech is not okay.&lt;br&gt;&lt;br&gt;
Then I thought about &lt;a href="https://www.dailydot.com/parsec/bocchi-smash-bros-racial-slur/" rel="noopener noreferrer"&gt;this recent debacle&lt;/a&gt; in the Super Smash Brothers scene. An up-and-coming competitor was caught using racial slurs in Discord.  &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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2Fb.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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2Fb.jpg" alt="Reddit hate speech"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;She was summarily cancelled, and rightly so.&lt;br&gt;&lt;br&gt;
However, these messages in the screenshot had to be manually searched for. Who knows how much hate speech is being ignored on Discord simply because no one has ever bothered to look for it?  &lt;/p&gt;




&lt;p&gt;...Hang on, doesn't that sound like something a bot could do? That thought got me started, and before long I saw a few opportunities:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reddit is a massive ecosystem where everything is public, but on Discord there are many discrete servers, making it easy for hate speech users to hide. Wouldn't it be cool to make a bot that can keep track of hate speech users across the entire Discord system?
&lt;/li&gt;
&lt;li&gt;The Reddit bot was by request only. Wouldn't it be nicer to have automatic tracking of hate speech in your server, without having to know who exactly to look up?
&lt;/li&gt;
&lt;li&gt;On top of that, wouldn't it be great if you could be alerted when a hate speech user joins your server, or when someone in your server uses hate speech elsewhere?
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With those main design goals, I got to work.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Clarity and Confrontation
&lt;/h3&gt;

&lt;p&gt;When someone uses hate speech on a server using SafeSpace, the bot immediately logs the infraction, deletes the message, and replies sternly.  &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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F2.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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F2.png" alt="Auto-reply"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The admins of that server are also notified immediately.  &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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F1.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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F1.png" alt="Notifications"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Admins of other servers that user is in (that are also running SafeSpace) are notified 24 hours later, unless the offender has been forgiven by their admin in that time.  &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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F3.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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F3.png" alt="Other server notifications"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On the other end, if a normal server member wants to check on hate speech users in the server, they can.  &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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F7.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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F7.png" alt="List of offenders"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They also have the power to see exactly what hate speech their fellow server member has used, and when.  &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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F6.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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F6.png" alt="Auto-reply"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tracking Across Servers
&lt;/h3&gt;

&lt;p&gt;SafeSpace keeps a server-agnostic database of offenders. That alone sets it apart from most moderation bots, because it can warn admins and other members about hate speech users even if they haven't used hate speech in that specific server yet.  &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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F4.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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F4.png" alt="Auto-reply"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The beauty of this bot lies in the fact that the more servers use it, the better it gets at rooting out hate speech users across the entire Discord network. With every server added, the more likely a hate speech user is to be caught, and the more servers can be notified when their members use hate speech, and the more servers will know when a hate speech user joins.Its effectiveness scales exponentially with adoption, so &lt;a href="https://discordapp.com/oauth2/authorize?client_id=605039242309140483&amp;amp;scope=bot&amp;amp;permissions=76800" rel="noopener noreferrer"&gt;add it to your server!&lt;/a&gt; You never know what it might catch.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Leaving No Stone Unturned
&lt;/h3&gt;

&lt;p&gt;When SafeSpace is added to a server, it searches the chat history for hate speech. These past infractions are also quietly saved.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Treading Softly
&lt;/h3&gt;

&lt;p&gt;Not every user in the server needs to have someone else's hate speech paraded around in front of their face; in fact, this will likely strike a more negative tone in the server overall. In cases such as hate speech by a server member in a different server, or a tracked offender joining the server, the bot only messages the server admin, and allows them to use their own discretion toward the offender.&lt;br&gt;&lt;br&gt;
Words have context, and there will always be times when an infraction shouldn't be treated harshly. That's why the bot also allows server admins to forgive users for hate speech used on their server.  &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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F5.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%2Fwww.jasperstephenson.com%2Fposts%2Fsafespace%2F5.png" alt="Forgiveness"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://discordapp.com/oauth2/authorize?client_id=605039242309140483&amp;amp;scope=bot&amp;amp;permissions=76800" rel="noopener noreferrer"&gt;Add SafeSpace to your Discord server now!&lt;/a&gt;&lt;br&gt;&lt;br&gt;
If you're curious, the whole project is open source, so you can &lt;a href="https://github.com/midblue/safespace-bot" rel="noopener noreferrer"&gt;check out the repository on Github.&lt;/a&gt;&lt;br&gt;&lt;br&gt;
If you're feeling generous, you could also &lt;a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;amp;hosted_button_id=EPH9CL25C3LLA" rel="noopener noreferrer"&gt;donate to help out with server costs.&lt;/a&gt; :)&lt;br&gt;&lt;br&gt;
Also, if you liked this bot, check out my &lt;a href="https://www.jasperstephenson.com/posts/timezonebot" rel="noopener noreferrer"&gt;Timezone Bot for Discord!&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Thanks for reading!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Crosspost from &lt;a href="https://www.jasperstephenson.com/" rel="noopener noreferrer"&gt;my personal website.&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Hidden Coding Challenges?</title>
      <dc:creator>Jasper Stephenson</dc:creator>
      <pubDate>Tue, 08 May 2018 12:33:37 +0000</pubDate>
      <link>https://dev.to/midblue/hidden-coding-challenges-2g5l</link>
      <guid>https://dev.to/midblue/hidden-coding-challenges-2g5l</guid>
      <description>&lt;p&gt;So I was on a website today trying to send some money between continents, and I ended up rooting around in the console looking for an error that I thought might have occurred when I saw this in the log:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Welcome to TransferWise's CLI challenge.

Use the object 'DevChallenge' to communicate with me.
Just set the DevChallenge.answer property to send in your answers.

Also don't forget to mention the last keyword when
you apply for a job at TransferWise :)

First question: are you ready?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://transferwise.com/"&gt;link – open the console&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've seen these types of challenges before, and I was bored, and long story short I completed their whole 10-question code challenge.&lt;/p&gt;

&lt;p&gt;Simply put, I thought it was really fun!&lt;/p&gt;

&lt;p&gt;So, I have a few questions for the dev.to masses:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Does anyone know of more of these? I have some time to kill and I want to do more!&lt;/li&gt;
&lt;li&gt;It seems like most of these are trying to drum up baseline-qualified applicants for dev jobs with their service. Do you think that a code challenge like this is actually useful for either applicants or hiring directors?&lt;/li&gt;
&lt;li&gt;What's a question you'd definitely put on your hidden test if you were to design your own?&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>discuss</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
