<?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: Ashley Tonkin</title>
    <description>The latest articles on DEV Community by Ashley Tonkin (@ashdev).</description>
    <link>https://dev.to/ashdev</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%2F260980%2F823f86e1-df5c-4ffe-a0a5-eee971962925.jpeg</url>
      <title>DEV Community: Ashley Tonkin</title>
      <link>https://dev.to/ashdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ashdev"/>
    <language>en</language>
    <item>
      <title>[Part 1] Getting Started</title>
      <dc:creator>Ashley Tonkin</dc:creator>
      <pubDate>Tue, 31 Mar 2020 16:07:17 +0000</pubDate>
      <link>https://dev.to/ashdev/part-1-getting-started-43b5</link>
      <guid>https://dev.to/ashdev/part-1-getting-started-43b5</guid>
      <description>&lt;h1&gt;
  
  
  welcome
&lt;/h1&gt;

&lt;p&gt;I'm guessing you are here because you would like to learn on how to get started making your own discord bot with Java.&lt;br&gt;
You have come to the right place today we will be using the JDA (Java Discord API) built by &lt;a href="https://github.com/DV8FromTheWorld"&gt;&lt;strong&gt;DV8FromTheWorld&lt;/strong&gt;&lt;/a&gt; and JDA-Utilities built by &lt;a href="https://github.com/jagrosh"&gt;&lt;strong&gt;jagrosh&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before we jump into the code, make sure you have an IDE or text editor with the ability to compile Java.&lt;br&gt;
I'll be using IntelliJ IDEA by &lt;a href="https://www.jetbrains.com/"&gt;Jetbrains&lt;/a&gt; some others you can use are &lt;a href="https://www.eclipse.org/"&gt;Eclipse&lt;/a&gt;, &lt;a href="https://netbeans.org/"&gt;Netbeans&lt;/a&gt;, &lt;a href="https://code.visualstudio.com/"&gt;VS Code&lt;/a&gt;* you will need to install plugins to compile Java&lt;/p&gt;

&lt;p&gt;Ok now you have the tools to be able to compile Java lets jump into the code, for this project I will be using Maven as my builder.&lt;/p&gt;

&lt;p&gt;We need to start by creating a new project&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FWxH17rB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/B317p20/create-new-project.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FWxH17rB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/B317p20/create-new-project.png" alt="create_new"&gt;&lt;/a&gt;&lt;br&gt;
We would like to create a Maven project and select our project &lt;a href="https://www.oracle.com/java/technologies/javase-downloads.html"&gt;JDK&lt;/a&gt; (Java Development Kit) If you don't have a JDK installed i have provided a link.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zLnPEdce--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/tDqmLwS/maven-project.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zLnPEdce--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/tDqmLwS/maven-project.png" alt="maven_project"&gt;&lt;/a&gt;&lt;br&gt;
Here we need to pop the Artifact Coordinates down, Name your project, select the file destination to save your project.&lt;br&gt;
Under Artifact Coordinates&lt;br&gt;
&lt;strong&gt;GroupId&lt;/strong&gt;: This is usually a domain backwards Eg. to.dev&lt;br&gt;
&lt;strong&gt;ArtifactId&lt;/strong&gt;: is normally the name of the project.&lt;br&gt;
&lt;strong&gt;Version&lt;/strong&gt;: I hope is self explanatory&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IPimCYdB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/VwXwhmt/maven-project-02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IPimCYdB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/VwXwhmt/maven-project-02.png" alt="maven_project_02"&gt;&lt;/a&gt;&lt;br&gt;
Click next and you will be greeted with your first file, Its a .xml file called pom, should look at something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;project&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;"http://maven.apache.org/POM/4.0.0"&lt;/span&gt;
  &lt;span class="na"&gt;xmlns:xsi=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt;
  &lt;span class="na"&gt;xsi:schemaLocation=&lt;/span&gt;&lt;span class="s"&gt;"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;modelVersion&amp;gt;&lt;/span&gt;4.0.0&lt;span class="nt"&gt;&amp;lt;/modelVersion&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;tv.ashdev&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;DevToProject&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;0.0.1&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;


&lt;span class="nt"&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is where we add our JDA and JDA-Utilities&lt;br&gt;
JDA Maven&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;net.dv8tion&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;JDA&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;VERSION&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;repository&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;id&amp;gt;&lt;/span&gt;jcenter&lt;span class="nt"&gt;&amp;lt;/id&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;name&amp;gt;&lt;/span&gt;jcenter-bintray&lt;span class="nt"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;url&amp;gt;&lt;/span&gt;https://jcenter.bintray.com&lt;span class="nt"&gt;&amp;lt;/url&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/repository&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JDA-Utilities&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;com.jagrosh&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;jda-utilities&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;version&amp;gt;&lt;/span&gt;JDA-UTILITIES-VERSION&lt;span class="nt"&gt;&amp;lt;/version&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;scope&amp;gt;&lt;/span&gt;compile&lt;span class="nt"&gt;&amp;lt;/scope&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;pom&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We would like to wrap the dependencies in a tag together conveniently the tag we need is &lt;code&gt;&amp;lt;dependencies&amp;gt;&amp;lt;/dependencies&amp;gt;&lt;/code&gt;&lt;br&gt;
We also need to put the repository in a new tag as well &lt;code&gt;&amp;lt;repositories&amp;gt;&amp;lt;/repositories&amp;gt;&lt;/code&gt;&lt;br&gt;
Be sure to add the current build versions&lt;/p&gt;

&lt;p&gt;After all that you should have something that looks like this.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mnm5jmry--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/25LfjxS/Screenshot-5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mnm5jmry--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/25LfjxS/Screenshot-5.png" alt="pom.xml"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that our pom file is finished and out of the way, we need to create a new Java class file, On the left hand side you want to drop down your project folder -&amp;gt; src -&amp;gt; main&lt;br&gt;
Inside the main folder you should see a java folder and a resources folder.&lt;br&gt;
You need to right click on the java folder -&amp;gt; new -&amp;gt; Java Class&lt;br&gt;
I have called mine the same as my project &lt;code&gt;DevToProject&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is what i have currently a new java class&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DevToProject&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to add the &lt;code&gt;main&lt;/code&gt; method to the class so it knows what to run when we compile and run the bot&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;

&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That needs to be added inside of the class brackets&lt;br&gt;
From there we need to first create our bot for discord head over to the &lt;a href="https://discordapp.com/developers/"&gt;discord developer portal&lt;/a&gt; and create a new application i called mine &lt;code&gt;DevTo&lt;/code&gt; just for this project.&lt;/p&gt;

&lt;p&gt;We would like to create a bot so lets click on the bot under settings on the left hand side and go &lt;code&gt;Add Bot&lt;/code&gt; and accept.&lt;/p&gt;

&lt;p&gt;Now that we now have a bot we need something before we leave the page, that is the bot token. You must keep this to yourself other wise anyone else can take control of your bot.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0AmKPZP---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/4SCFB3w/Screenshot-7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0AmKPZP---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/4SCFB3w/Screenshot-7.png" alt="bot_token"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Great we are nearly finished, we will have the bot up and running in no time.&lt;/p&gt;

&lt;p&gt;At the top within our main method we would like to start to add our JDA-Utilities code.&lt;br&gt;
We need to create a new EventWaiter and CommandClientBuilder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;EventWaiter&lt;/span&gt; &lt;span class="n"&gt;waiter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;EventWaiter&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="nc"&gt;CommandClientBuilder&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CommandClientBuilder&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;before we add the &lt;code&gt;;&lt;/code&gt; at the end of our CommandClientBuilder we need to add some more code.&lt;br&gt;
We would like to add a command prefix, Bot Status. Owner Id and Activity&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="c1"&gt;//JDA-Utilities&lt;/span&gt;
    &lt;span class="nc"&gt;EventWaiter&lt;/span&gt; &lt;span class="n"&gt;waiter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;EventWaiter&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
    &lt;span class="nc"&gt;CommandClientBuilder&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;CommandClientBuilder&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setPrefix&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"-"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setStatus&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;OnlineStatus&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;ONLINE&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setOwnerId&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"160269653136900096"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;setActivity&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Activity&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;playing&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"with other bots"&lt;/span&gt;&lt;span class="o"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get your ID you need to enable &lt;a href="https://www.discordia.me/en/developer-mode"&gt;Dev Mode&lt;/a&gt; in discord&lt;br&gt;
Play around with the online status and activity as you can do a lot of fun things with them.&lt;/p&gt;

&lt;p&gt;Now lets build the bot using JDA, this can be tricky as the examples on the github page and within the wiki haven't been updated 100% yet to implement the new JDABuilder.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt; &lt;span class="no"&gt;JDA&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;JDABuilder&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;createDefault&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"BOT TOKEN HERE"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;addEventListeners&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;waiter&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt;
        &lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;awaitReady&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;WAIT BEFORE WE BUILD OUR BOT&lt;br&gt;
we need to add something to our pom file before out dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;build&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;plugins&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.apache.maven.plugins&lt;span class="nt"&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;maven-compiler-plugin&lt;span class="nt"&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;configuration&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;source&amp;gt;&lt;/span&gt;11&lt;span class="nt"&gt;&amp;lt;/source&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;target&amp;gt;&lt;/span&gt;11&lt;span class="nt"&gt;&amp;lt;/target&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/configuration&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/plugins&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/build&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So it looks like this&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VdPJISkw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/Jzd7N50/Screenshot-8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VdPJISkw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/Jzd7N50/Screenshot-8.png" alt="new_pom_file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building the bot, top right hand corner you'll see a button that says &lt;code&gt;Add Configuration&lt;/code&gt;, click that and a new pop up window should appear.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2aDVwIna--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/ykxjgKJ/Screenshot-9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2aDVwIna--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/ykxjgKJ/Screenshot-9.png" alt="config"&gt;&lt;/a&gt;&lt;br&gt;
Click the &lt;code&gt;+&lt;/code&gt; top left and select application&lt;br&gt;
Sometimes it will add the Main class sometime's it doesn't if it doesn't click on &lt;code&gt;...&lt;/code&gt; and select the main class we created earlier mine was called &lt;code&gt;DevToProject&lt;/code&gt; once that has been set, click apply then ok.&lt;/p&gt;

&lt;p&gt;Now next to out configuration button we have a green play button.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b--8o7DG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/J2130Bv/Screenshot-11.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b--8o7DG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/J2130Bv/Screenshot-11.png" alt="build"&gt;&lt;/a&gt;&lt;br&gt;
That will build the bot and put it online, let's not worry about the SLF4J messages at the moment. Let's add our bot to our discord server.&lt;/p&gt;

&lt;p&gt;Back over to the discord developer portal -&amp;gt; select our bot -&amp;gt; OAuth2&lt;br&gt;
from here we need to select bot and just for simplicity lets just give the bot admin permissions. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uDaQAeCw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/JjBXfcM/Screenshot-12.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uDaQAeCw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/JjBXfcM/Screenshot-12.png" alt="bot_add"&gt;&lt;/a&gt;&lt;br&gt;
Copy the link it gives you paste it in a new browser window.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J5cVSQZJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/KmkWwXX/Screenshot-13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J5cVSQZJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.ibb.co/KmkWwXX/Screenshot-13.png" alt="bot_add_server"&gt;&lt;/a&gt;&lt;br&gt;
select your server, authorize the bot, go thought the google reCAPTCHA and you are done.&lt;/p&gt;

&lt;p&gt;If you have made it this far i thank you.&lt;br&gt;
Please let me know if i have missed anything and I will update the post.&lt;/p&gt;

</description>
      <category>java</category>
      <category>beginners</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
