Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve README.md #22

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 27 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
A small Discord moderation bot, without a command handler
A small Discord moderation bot, without a command handler.


# Getting started (For people who aren't used to Discord.js)
# Getting started

## Requirements

### Requirements
* Node.js
* A code editor (visual studio code, atom, notepad++ etc)
* [Node.js](https://nodejs.org/) (LTS recommended)
* Git
* A code editor (Visual Studio Code, Atom, notepad++, etc.)

### Step zero, making a Discord bot account
Go to https://discord.com/developers and make an application. After creating your application, you should have the option to create a bot user.
## Insturctions

### Step one, making the folder
Make a folder for which your bot's coding will be in
1. Go to https://discord.com/developers and make an application. After creating your application, you should have the option to create a bot user.

3. Make a folder for which your bot's code will be in, then do `Shift + Right click` and select `Open Powershell Window here`
![A screenshot of a context menu on File Explorer highlighning the choice "Open Powershell Window here"](https://i.imgur.com/1quX9nB.png)

### Step two, opening powershell
Do shift + right click and select open powershell (or cmd depending on your PC)
![Step two](https://i.imgur.com/1quX9nB.png "Step two")
4. Run the script below

```sh
git clone https://github.com/J2Olsen/discord.js-moderation-bot.git && cd discord.js-moderation-bot && npm init && npm install discord.js
```

### Step three, initiating, type `npm init`
> *Note*: This will make a file called `package-lock.json` and a directory called `node_modules`, please don't delete that.

### Step four, installing Discord.js
Now, you should type `npm install discord.js`, we are installing the discord.js module. Note: This will make a file called `package-lock.json` and a directory called `node_modules`, please don't delete that.
5. Get your bots token.

### Step five (I), getting your bot's token
Get your bots token. Reminder, bot tokens are key information that gives complete access to your bot.
> **Reminder**: Keep your bot token safe, anybody can have complete access to your bot if they have it.

### Step five (II), config.json
Place your bot's token **between** the quotation marks, you can also edit the prefix if you'd like.
![Step six](https://i.imgur.com/dy7OSYW.png "Step six")
6. Place your bot's token **between** the quotation marks, you can also edit the prefix if you'd like.
![A screenshot of JSON code highlighing text between quotation marks](https://i.imgur.com/dy7OSYW.png)

### Step six, running your bot
Run your bot by typing `node bot` into your powershell/cmd
8. Run your bot by running the command below in a Terminal / Powershell

```sh
node bot
```

Your bot is running! You can use [this](https://discordapi.com/permissions.html#) to generate an invite link for your bot.

### Step seven, adding your bot to your server
Use this link and replace **client_id_here** with your actual client ID
https://discordapp.com/api/oauth2/authorize?client_id=client_id_here&permissions=0&scope=bot
# And your bot is running!
Enjoy the bot, updates are frequent so always return to replace your `bot.js` with the newest one.

---

### Any errors?
## Any errors?

If you'd like to come to me personally, join the [support server](https://discord.gg/t2nV9kBnch)

Also a big thank you to the contributors for correcting small errors and adding help to the bot.