
$ npm install -save discord.js -production -no-optional To install this dependency to your project (and save it in package.json), run the following command You can customize this as much as you want, but if you just press return a few times you’ll be good to go.įor this project, we will be using discord.js, a library that will allow us to interact with the Discord API directly from NodeJS. This file will contain some metadata about your project, as well as keep track of any dependencies we may need. Here, you’re going to enter the information from which npm will configure the package.json for your project. NOTE: NodeJS 6.0.0 or higher is required for use of discord.js, a library we will be using in this tutorial.įire up the command line and enter the following If you don’t already have it, go ahead and install NodeJS. NOTE: You’ll need both your app’s client ID and this bot’s Token later on in the tutorial, so make note of them now Setting up the NodeJS project This is what is going to actually be interacting with the users in your Discord server. On the next page, you need need to click on the “Create a Bot User” button.
#Runemate bot programming free#
Our app is going to simply be called “reverser-bot”, but feel free to pick anything you like. Now, give your app a name and optionally a description and icon. Go ahead an click on the “New Application” button to create a new Discord app. Riveting stuff.įirst things first, you’ll need to head on over to My Applications on the Discord site (create an account if you don’t already have one). You could use it for all sorts of things, but in this tutorial we’ll be using it to reverse whatever message the user sends to it. So, what exactly is a Discord Bot? Well, it’s basically a robot user that you add to a server and bend to do your will. In this tutorial, we will be using NodeJS and discord.js to write a simple bot for Discord. And best of all, you can hack around on their API to make your own bot to say, tell you the weather, or show you pictures of cats. You can create your own servers, channels within those servers, permissions, etc.
If you’re unfamiliar with Discord, it’s a text & voice chat application that targets gamers.
