Basics

Now it is time to begin to learn how to use Discord.py and how to both read and understand the documentation. It is important to know how to interpret documentation so you can find the answers to your questions by yourself.

Note: Th following is a very brief explanation of the documentation and it is recommended that you know how to interpret it already.

Let's Begin

Client

The first main thing you will notice in the documentation is the discord.Client() class. This represents the client you will use to connect and interact with the Discord API.

In this guide, discord.Client() will be represented as client, so if you choose a different name, make sure to replace client with it.

As you can see, there are many options available for you to use, however you can read how to use each one on your own.

Below that, there is a long list of available attributes you can access for use in your bot.

Coroutines

Many of the functions in Discord.py are coroutines. As explained here, coroutines must be called with await before them. For example, send_message() would be called with await client.send_message(). We'll get back to send_message() later.

To know if a function is a coroutine, look for this line in the documentation:

FAQ

There is a specific section of the Discord.py documentation dedicated to FAQs. It is located here.

results matching ""

    No results matching ""