Creating Cogs and Commands - Python Discord Bot

Published: 11 March 2021
on channel: Jonah Lawrence • Dev Pro Tips
11,128
83

How to add cog modules and more commands to a Python Discord Bot

❤ Subscribe: http://bit.ly/SubscribeDPT

In this tutorial, I will be showing you how to create cogs in a Discord bot to make maintainable and scalable code and I will also show you how to make more advanced commands that take multiple or unlimited parameters.

The commands I will be showing you how to make in this video are a dice rolling command and a command to pick a random choice from a list of options.

👨‍💻 Source Code
https://github.com/DenverCoder1/Tutor...

💬 Dev Pro Tips Discussion & Support Server
  / discord  

📜 Discord.py (dpy is no longer maintained, see Nextcord below)
Documentation - https://discordpy.readthedocs.io/en/l...
Discord.py Server -   / discord  

📜 Nextcord
Documentation - https://nextcord.readthedocs.io/en/la...
Nextcord Server -   / discord  

📓 Python Discord Bot Template
https://github.com/DenverCoder1/disco...

📺 In this video:
0:00​ - Introduction
0:15 - Creating a Cog
3:06 - Adding Commands to a Cog
4:00 - Loading Cogs
6:30 - Adding a "Random" Cog
7:29 - Dice Roll Command
14:34 - Random Choice Command
18:35 - Conclusion

In future videos in this series, I will show you how you can:
Implement a fancy Help Command
Make a bot to welcome users
Interact with other APIs to make useful bot features
Much more

Make sure to subscribe so you don't miss anything!

🐍 More Discord Bot Tutorials
   • Building Discord Bots with Python 🐍  

💻 More tutorials
   • Tutorials  

🙋‍♂️ Find me on other channels
Discord 🗨️ https://bit.ly/dpt-discord
Twitter ✍   / denvercoder1  
Github 👨‍💻 https://github.com/DenverCoder1
Sponsor 💞 https://github.com/sponsors/DenverCoder1
Buy me a coffee ☕ https://ko-fi.com/jlawrence

💖 SPONSORS 💖
Get your username or a link to your channel here by sponsoring on GitHub
▶ https://github.com/sponsors/DenverCod...

🎁 GET FREE STUFF WHILE SUPPORTING MY TUTORIALS
► https://bit.ly/jlawrencepromos


On this page of the site you can watch the video online Creating Cogs and Commands - Python Discord Bot with a duration of hours minute second in good quality, which was uploaded by the user Jonah Lawrence • Dev Pro Tips 11 March 2021, share the link with friends and acquaintances, this video has already been watched 11,128 times on youtube and it was liked by 83 viewers. Enjoy your viewing!