How to Create a Bot on Discord: A Beginner's Guide (2024)

  • Categories
  • Computers and Electronics
  • Internet
  • Online Communications
  • Instant Messaging
  • Discord

Download Article

A beginner-friendly guide to creating your own Discord bot

Written byDarlene Antonelli, MA

Last Updated: November 20, 2023Fact Checked

Download Article

  • Creating the Bot
  • |
  • Sending the Bot to Server/Channel
  • |
  • Popular Discord Bots
  • |

If you run a Discord server, you can use bots to take care of repetitive tasks, greet new people in channels, keep music playing, and so much more. Creating a bot in Discord is easy, and this guide will teach you how.

Things You Should Know

  • Open Discord and toggle on Developer Mode. Then, select "Discord API to create your bot application.
  • Create the bot on the Developer website and copy the token.
  • Click to generate a URL for the bot, then follow that URL to add the bot to your server.

Section 1 of 3:

Creating the Bot

Download Article

  1. 1

    Code your Bot. Download Node.js from https://nodejs.org/en/download/ if you don't have it. You'll need to program the bot to be able to use it, and Node.js is a free JavaScript runtime that you’ll need to make your bot. You can pick either the Windows or macOS installer and which version. The LTS version is recommended for this process.

  2. 2

    Open Discord to "User Settings." Click the app icon that looks like a controller on a light background, or log into the web app at https://discord.com. You can do this on a Windows or Mac computer. In this section, you'll create an app that activates the bot, so you'll create an app and a bot.

    • Click the gear icon to open "User Settings."

    Advertisem*nt

  3. 3

    Click Advanced. It's in the menu on the left side of the "User Settings" window under the "App Settings" header.

  4. 4

    Click the switch next to "Developer Mode" to toggle it on

    . The switch will display a checkmark and be green if the feature is on.

  5. 5

    Click Discord API. You'll see this included in the text with "Developer Mode."

    • Your browser will open to Discord's Developer Portal documents.
  6. 6

    Click Applications. You'll see this in the top left corner of the page.

    • Log into your Discord account again if prompted.
  7. 7

    Click the blue New Application button. You’ll see this on the right side of the browser. A window will pop up for your app’s name.

    • Type in the application's name, agree to the Discord Developer ToS, and click “Create.” You'll want to create a descriptive name, like "Greeterbot," if your app bot greets people. However, "Greeterbot" will most likely trigger errors later on because it's a popular name, so add a series of numbers after the name, like "Greeterbot38764165441."
  8. 8

    Click Bot in the left-hand menu. This is also the jigsaw puzzle piece icon.

  9. 9

    Click Add Bot. This is under the “Build-A-Bot” header.

    • Click “Yes, do it!” in the pop-up to confirm your action.
    • If you get an error about the name being too popular, go to the application page and change the app name. For example, “Music Bot” was too popular, so adding a few numbers to the end of the app helped.
  10. 10

    Click Click to Reveal Token. You’ll see this in the information area of your bot. When you click that text, you see a string of letters and numbers.

    • Click “Copy” to copy all that text. You can paste it on a sticky note somewhere, but make sure you have access to that code and don’t give it out to anyone. Whoever has that code can control the bot. This code will always be here if you need it.
  11. Advertisem*nt

Section 2 of 3:

Sending the Bot to Server/Channel

Download Article

  1. 1

    Click Bot in the left-hand menu. This is also the jigsaw puzzle piece icon.

  2. 2

    Check the toggles under the "Authorization Flow" header. You want "Public Bot" on if you want people other than yourself to have the ability to add the bot to their server. The toggle next to "REQUIRES OAUTH2 CODE GRANT" should be off unless the service your bot is using requires the toggle to be on.

  3. 3

    Click OAuth2 and URL Generator. This menu has a section called "Scopes" with a bunch of empty checkboxes.

  4. 4

    Click the box next to "bot" to check it

    . You'll see another section of checkboxes appear below "Scopes."

  5. 5

    Check the boxes for the permissions you want your bot to have. For example, if you're creating a music-playing bot, you'd check Speak under "Voice Permissions."

  6. 6

    Copy the generated URL. Click Copy next to the URL at the bottom of the page.

  7. 7

    Paste the URL in your browser. Click your address bar in your web browser and paste the generated URL. A pop-up will prompt you to select a server to add the bot to.

    • Select a server you own or have admin permissions to, then confirm that you're human. Finally, click Authorize to finish adding the bot to your server.[1]
    • So far, you've created and added a bot to your Discord server! However, it won't reply to any commands or prompts until you code it. If you're not a skilled programmer, you can look into pre-programmed bots that you can simply add to your server.
  8. Advertisem*nt

Section 3 of 3:

Popular Discord Bots

Download Article

  1. 1

    Midjourney AI: This bot will help you create AI-generated art, like portraits, landscapes, etc. You can easily add Midjourney to your server and subscribe to a plan so you can create art with AI.

  2. 2

    Mee6: This is a great Discord management bot. You can adjust the settings so Mee6 shows your users leveling up.

  3. 3

    Dank Memer: Use this bot to share dank memes in your Discord channels.

  4. 4

    Easy Poll Bot: While you can easily create polls using reaction emojis, you can also use this bot.

  5. 5

    Hydra: A bot that plays music and supports Spotify and Soundcloud.

  6. Advertisem*nt

Community Q&A

Search

Add New Question

  • Question

    My bot says it's offline what do I need to do?

    How to Create a Bot on Discord: A Beginner's Guide (30)

    Josh I Guess

    Community Answer

    Have you done the code correctly? Try redoing the code. Make sure you do "node bot.js" without the quotes when you finish the code.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 82Helpful 14

  • Question

    What do I do if it says error when typing node bot.js into command prompt?

    How to Create a Bot on Discord: A Beginner's Guide (31)

    Josh I Guess

    Community Answer

    Have you done the code correctly? Try redoing the code. Make sure you're typing everything right.

    Thanks! We're glad this was helpful.
    Thank you for your feedback.
    If wikiHow has helped you, please consider a small contribution to support us in helping more readers like you. We’re committed to providing the world with free how-to resources, and even $1 helps us in our mission.Support wikiHow

    YesNo

    Not Helpful 110Helpful 6

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

      Advertisem*nt

      Submit a Tip

      All tip submissions are carefully reviewed before being published

      Submit

      Thanks for submitting a tip for review!

      You Might Also Like

      2 Simple Ways to Format Text Into Code on Discord2 Easy Ways to Hide What Game You're Playing on Discord
      5 Easy Ways to Stop Discord from Opening on StartupTop 21 Discord Channel Ideas 2 Methods to Spoiler Tag an Image on the Discord App on iOS and Android2 Simple Ways to Send a Friend Invite on Discord2 Ways to Send an Invisible Message on DiscordHow to Stream Hulu on Discord using Windows and MacDiscord: How to Turn Off the Overlay on Desktop and AndroidHow toFake Discord Messages Using Inspect Element

      Advertisem*nt

      About This Article

      How to Create a Bot on Discord: A Beginner's Guide (46)

      Written by:

      Darlene Antonelli, MA

      wikiHow Technology Writer

      This article was co-authored by wikiHow staff writer, Darlene Antonelli, MA. Darlene Antonelli is a Technology Writer and Editor for wikiHow. Darlene has experience teaching college courses, writing technology-related articles, and working hands-on in the technology field. She earned an MA in Writing from Rowan University in 2012 and wrote her thesis on online communities and the personalities curated in such communities. This article has been viewed 98,453 times.

      How helpful is this?

      Co-authors: 13

      Updated: November 20, 2023

      Views:98,453

      Categories: Discord

      In other languages

      Indonesian

      Spanish

      Portuguese

      • Print
      • Send fan mail to authors

      Thanks to all authors for creating a page that has been read 98,453 times.

      Is this article up to date?

      Advertisem*nt

      How to Create a Bot on Discord: A Beginner's Guide (2024)

      References

      Top Articles
      Latest Posts
      Article information

      Author: Pres. Carey Rath

      Last Updated:

      Views: 5958

      Rating: 4 / 5 (61 voted)

      Reviews: 84% of readers found this page helpful

      Author information

      Name: Pres. Carey Rath

      Birthday: 1997-03-06

      Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

      Phone: +18682428114917

      Job: National Technology Representative

      Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

      Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.