Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 2.94 KB

CREATE_YOUR_FIRST_BOT.md

File metadata and controls

53 lines (39 loc) · 2.94 KB

Create your first discord bot using dizbot

Table

  1. Machine setup (install Python 3 and pip)
  2. Discord setup (create a bot account and add it to servers)
  3. dizbot usage (generate bot code using dizbot)

Machine setup

You can skip this section if you already have Python 3 and pip installed on your machine

Python 3 and Pip

Python installation

  1. Open command prompt if on windows or open Terminal if on Mac or Linux, and run python3 -v to check if you already have Python. If it prints out the version, you are done
  2. Otherwise download and install the latest Python 3 version for your OS

Pip installation

  1. Pip is usually installed with Python 3 >= 3.4. To verify, run command pip -v. If it prints out the version, you are done
  2. Otherwise, you can download get-pip.py
  3. Open command prompt or terminal and navigate to the folder containing the get-pip.py file. Learn how to do it on Windows and/or Mac/Linux
  4. Run the command: python get-pip.py
  5. Confirm installation by running pip -v

Discord setup

If you already have a bot and its client token created on discord's developer portal, you can skip this section

  1. Make a discord account if you haven't already
  2. Go to developer portal and click on the New Application button on the top right Developer portal
  3. Create the application and go to the Bot section and build a bot Bot page
  4. Copy and securely save your bot's client token Client token
  5. Go to OAuth2 section, select the bot scope and add required permissions. Copy the generated URL and paste it into your browser (or send it to your server's admin) OAuth2
  6. Add the bot to a server you admin by following the instructions in this page Add bot page
  7. Congrats you have setup your new bot!

dizbot usage

  1. Install dizbot by running pip install dizbot in command prompt or terminal
  2. Navigate to the directory you want your bot files to be in
  3. Command dizbot run will walk you through adding functionality to your bot and generate bot code
  4. You can add the client token you saved in step 4 of Discord setup through the command line, or add it in the client_token.txt file that dizbot creates
  5. Run command python3 bot.py to start the bot
  6. Test out your bot by running a command in the discord server your bot is in!

demo gif