Quickstart - 4.3.2-rc.1 Documentation

Creating a Bot#

Before you can run your Bot, you have to create it first. If you did it already, make sure you invited your Bot properly.

In order to create your Bot, you need to create an application first. Go to the discord applications page for that. After you logged in, you will see this at the top:

_images/create_application.png

Click the New Application button, enter a name and then click create.

Note

The name you choose is going to be your Bots name.

You will be redirected to a new page. On the left you will see this:

_images/applications_left.png

Click on Bot. You again will be redirected to another page, looking like this:

_images/build_a_bot.png

Click on Add Bot and then on Yes, do it!.

And that’s it! You created your Bot!

Warning

You will see a field called TOKEN. This is the access token, used to run your bot. You will need this later to start your Bot.

Do NOT give this to other persons! They can get full control over your Bot with your token and execute what they want!

If you revealed your token, you should immediately go to your Bots application page and click the Regenerate Button under your token. This will delete the old token, so your bot can’t be run with it anymore.

Invite the Bot to your guild#

Now you have a Bot, but you can’t create commands because it isn’t in any guilds. So, let’s invite it to your guild!

_images/OAuth2_left.png

Click on OAuth2, then on URL Generator.

You have to enable the bot and application.commands scope, to allow your bot to create slash commands.

_images/scopes_OAuth2.png

After setting that up, a BOT PERMISSIONS field will appear. You can choose permissions you want to have your bot there.

When you are done with choosing the permissions, go to the bottom of the page, copy the the url and open it in a new window.

You will be prompted to a new page. Select your guild, click Authorise and your Bot should show up in your guild.

Now you can go on with running your bot and creating your first commands!

Tag » How To Create Subcommands Discord Py