Description: The following material is primarily about a deeply planned tutorial aiming to give us some useful information on how to create and login to discord bot.
I’ve been playing with the discord module, the first thing I want to do is to make sure you download this off from the website, the second thing you want to do is that after you finish downloading, copy it, go into your CMD or command line or terminal.
This will give you the yorda, it allows you to interact with discord app, I’m not going to show you how to install it, I want to get into the code right.
But before we do it, we have a few things. First, you set up your own server, you don’t have your own server set up, the next thing, you go to discord, go to more developers, go to my apps, go ahead and create a new app, you call whatever you want.
I’ll call it a comm bot, it doesn’t matter super BOTS cool, create the app, make sure you create a bot user, click that and you can do whatever you want with this.
The next important thing you want to do is to go to client ID, no one else sees them, it’s fine for me to show you this, because it doesn’t matter, I’m using a test server, this is a test bot, so I’m going to be leaving.
Once you’ve done all this, go ahead and copy this, I’m going to put a link in the description to this link over here, you don’t want to go to discord app comm /o auth for class authorize, you’re going to paste that client ID, enter it and now this will take it to this page, then click on the server that you want to add the bot, so you can see my server doesn’t have anything.
Once I click authorize, it will add the bottle over there, I’m going to close this out, the only thing I need next is the token which we’ll use that later.
The first thing you’re going to do is to go ahead and create a variable or a constant rate, you can call whatever you want, this allows us to create good products, you want to create variables.
I hope you memorize what you are using, this is going to import the entire module, you’re requiring it in order to use it, there’s an entire variable discord which is a constant, it has all these resources, we can use them for other things.
I’m going to create another constant called the client and it’s going to represent our client, this is a small bot, that does need commands and output stuff.
You’re going to be using the client a lot, but there are a lot other advanced tutorials on the score BOTS, we’re going to start off with the basic console client.
You’re going to create a new discord rate, you open that quickly, I want to show you where these things are coming from, I’m still learning these things, please bear with me if I make a mistake.
It’s cool, it shows all these things, we’re not going to work with a lot of things, because I haven’t learned the entire module yet, the entire library, the main important thing is that you’re going to create a new discord client.
Let’s go ahead and capital C right number K sensitive, make sure you have everything good, I’ve created a new discord client and stored into the content variable.
I’m going to create another constant token, we need to log the ball into the client, you accidentally show somewhere token, generate a new one very easily.
Let’s go ahead and copy that really quickly, paste that, make sure it’s between a quotation mark and a single quote, we’re going to go ahead and lock the bottom. I’m going to split these tutorials up into different segments, we got the basic so far.