<?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: Alan Paradis</title>
    <description>The latest articles on DEV Community by Alan Paradis (@alanparadis).</description>
    <link>https://dev.to/alanparadis</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%2F382110%2F0fcb3bb8-1646-450b-9f55-201d2c1c464b.jpg</url>
      <title>DEV Community: Alan Paradis</title>
      <link>https://dev.to/alanparadis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alanparadis"/>
    <language>en</language>
    <item>
      <title>StackOverBot, a Discord bot for searching StackOverflow questions</title>
      <dc:creator>Alan Paradis</dc:creator>
      <pubDate>Sun, 08 May 2022 11:02:29 +0000</pubDate>
      <link>https://dev.to/alanparadis/stackoverbot-a-discord-bot-for-searching-stackoverflow-questions-5dbh</link>
      <guid>https://dev.to/alanparadis/stackoverbot-a-discord-bot-for-searching-stackoverflow-questions-5dbh</guid>
      <description>&lt;p&gt;⚠ &lt;strong&gt;SOME FEATURES ARE STILL WIP&lt;/strong&gt; ⚠&lt;/p&gt;

&lt;p&gt;Before we get started, I just want to give few words on my relationship with python 😄 (Jump straight to the bot)&lt;/p&gt;




&lt;h2&gt;
  
  
  Relationship with Python
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4IcY_kcT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3czjf9jklosiaedr0cs9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4IcY_kcT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3czjf9jklosiaedr0cs9.png" alt="Python Logo" width="50" height="50"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;I've used Python since almost 10 years but I have never deep dive into it, I use it sparingly when I just need to make quick tools like sorting files, handle data, need a quick QT interface for a tool. Even though I've made many small projects thought the years I consider myself a beginner in Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a StackOverflow Bot ?
&lt;/h2&gt;

&lt;p&gt;Making a Discord bot was a little challenge because many of my friends have already done it. I choose StackOverflow because the &lt;a href="https://api.stackexchange.com/docs"&gt;StackExchange/StackOverflow API&lt;/a&gt; is basically just playing with URL variable and making web request that sends back JSON.&lt;/p&gt;




&lt;h2&gt;
  
  
  The bot itself &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;The bot is made using Python 3.9 and &lt;a href="https://github.com/Pycord-Development/pycord"&gt;Pycord&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/AlanParadis/StackOverBot"&gt;Github of the project&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Question send by the bot&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---jUQAEej--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u45t4320nojf6kcg10tv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---jUQAEej--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u45t4320nojf6kcg10tv.png" alt="Question send by the bot" width="545" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Command to search questions&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7cS2sBgj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2e2vp01y9ya9fbmt3hq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7cS2sBgj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2e2vp01y9ya9fbmt3hq.png" alt="Command to search questions" width="677" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The bot can currently accept 4 inputs&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;search&lt;/code&gt; : the terms of your search&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tags&lt;/code&gt;: tags for the search separated by semicolon&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sort&lt;/code&gt;: sort method for the search (&lt;strong&gt;votes&lt;/strong&gt;, &lt;strong&gt;relevance&lt;/strong&gt;, &lt;strong&gt;creation&lt;/strong&gt;, &lt;strong&gt;activity&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;min&lt;/code&gt;: it's used depend on the sorting method, for now this only can be used in votes sort.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By reacting with ⏭, the bot show you the next question !&lt;br&gt;
You can see up to 5 questions&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TODO&lt;/strong&gt; : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add a max option&lt;/li&gt;
&lt;li&gt;Add the possibility to write a date in min and max so you can use it in &lt;strong&gt;creation&lt;/strong&gt; or &lt;strong&gt;activity&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Containerize my bot 🐋
&lt;/h2&gt;

&lt;p&gt;My bot can be easily build and deploy using the Docker with the Dockerfile in the Github repo. That's how I usually run my bot on my server.&lt;/p&gt;




&lt;p&gt;Thank for reading ! Don't hesitate to share your opinion about the bot and ask for features 😁&lt;/p&gt;

</description>
      <category>python</category>
      <category>sideprojects</category>
      <category>beginners</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
