Creating a Discord bot
To use Corde, there must be two bots in the a guild. The first one is your bot, the one that you want to test, the other is a bot that Corde to comunicate with your bot.
The first step to create a bot is go to Discord Developer Portal.
After login (if you are not already loged in) you will see a page like the picture bellow:
There, you go to New Application
. Click that button, you will be promped to define a name
of the bot, choose a nice name and click Create
.
Now that we created an application. Is time to create the real bot entity.
Go to the Bot
menu on left and click Add bot
.
Will be promped to you a note message and you can click in Yes, do it!
.
After click in the button, you now has your own A Great Bot
.
note
Each bot has a token
, it is unique and must be protected. Do not share the token
with other people, or expose it to any source of internet. If you unintentionally
commit the token to Github for instance, Discord detect it and
invalidate your token. After doing this you will receive a message to you on discord announcing
that security operation. But don't worry, if this happen, you just have to generate a new
token to the bot and make sure to now commit it again 😄.
Bot token
is bot used to Corde botToken and
for cordeBotToken. Pay attention about the
usage of each one.
Now that we have the bot and his token, let's add for his admin permission:
To do that, go to bottom of the page that we are now and mark the checkbox Administrator
Now we are going to mark our bot scope as bot
and generate a link to add the bot to a server.
Go to OAuth2
in the left side of the page and mark the checkbox bot
.
After that a new field will appear in the bottom wih a list of possible permissions
for the bot. Check Administrator
to allow our bot to have admin permission
and copy the link that appear above the permissions block.
After paste the generated link and press enter, you will see a prompt asking where to add the bot:
Choose a server and voilá, the bot is in your server!