Follow this guide: Creating a discord bot & getting a token by reactiflux
- Create a folder where your bot will be located and go there in terminal/node.js command prompt
- Download the repository's file into your project folder
We also need to install 'dependencies', so that our bot can connect to our server in discord and work
- First we need Node.js and npm
- Run all of these commands, using node.js command prompt as administator (only for windows)
- If you are on windows first run
npm install --global windows-build-tools
. - Then run
npm install
- Use this wizard to create or select a project in the Google Developers Console and automatically turn on the API. Click Continue, then Go to credentials.
- On the Add credentials to your project page, click the Cancel button.
- At the top of the page, select the OAuth consent screen tab. Select an Email address, enter a Product name if not already set, and click the Save button.
- Select the Credentials tab, click the Create credentials button and select OAuth client ID.
- Select the application type Other, enter the name "YouTube Data API Quickstart", and click the Create button.
- Click OK to dismiss the resulting dialog.
- Click the download (Download JSON) button to the right of the client ID.
- Move this file to your project directory and rename it to client_secret.json.
- Run
node bot
- The first time you will have to visit the provided url and copy the code
- Now the bot should show up in the server you told it to and you can type
n!help
for a list of commands - Give your bot admin under roles so that it can perform all of its functions.