-
- setup
-
- events
-
- commands
-
- cogs
-
- tasks
-
- mod cog
-
- admin cog
-
- poll cog
Before we can make any bots, we first have to install the discord.py library. Here's how to do that:
Open up your Command Prompt (go the Windows Search Bar and type in "cmd")
Type in this command:
py -3 -m pip install -U discord.py[voice]if that doesn't work, try
pip install -U discord.py[voice]Open up your Terminal
Type in
python3 -m pip install -U "discord.py[voice]"Note: discord.py is only supported by Python 3.5.3 or higher. If you have a lower version, go download a newer version at the Python Homepage.
discord developer portal: https://discord.com/developers/applications
create New Application
after applicaiton is created go to Bot tab and Reset Token
After the token is reset go to the OAuth2 -> URL Generator tab and select the following Scopes and Bot Permissions:
Scopes:
- bot
Bot Permissions:
- Administrator
Generate the url it will look similar to the following:
https://discord.com/api/oauth2/authorize?client_id=<your-bots-application-id-ie-client-id>&permissions=8&scope=botCopy the url and open a browser page and paste the url in the browser. This will allow you to invite the bot to your discord server.
Discord.py event reference: https://discordpy.readthedocs.io/en/stable/api.html#event-reference
Discord.py cog reference: https://discordpy.readthedocs.io/en/stable/ext/commands/api.html?highlight=cog#cog
Discord.py task reference: https://discordpy.readthedocs.io/en/stable/ext/tasks/index.html?highlight=task