Building a Discord Bot with Python - Bot Basics
How to make a Basic Discord Bot with Python ❤ Subscribe: http://bit.ly/SubscribeDPT In this tutorial, I will be showing you how to get started with building bots for Discord. You will learn how to create a bot user for running a bot, how to install the necessary libraries, and write a bot that can respond to messages and commands. 👨💻 Source Code https://github.com/DenverCoder1/Tutorial-Discord-Bot/tree/part-1-bot-basics 💬 Dev Pro Tips Discussion & Support Server https://discord.gg/fPrdqh3Zfu 📜 Discord.py (dpy is no longer maintained, see Nextcord below) Documentation - h̶t̶t̶p̶s̶:̶/̶/̶d̶i̶s̶c̶o̶r̶d̶p̶y̶.̶r̶e̶a̶d̶t̶h̶e̶d̶o̶c̶s̶.̶i̶o̶/̶e̶n̶/̶l̶a̶t̶e̶s̶t̶/̶i̶n̶d̶e̶x̶.̶h̶t̶m̶l̶ Discord.py Server - https://discord.gg/r3sSKJJ 📜 Nextcord Documentation - https://nextcord.readthedocs.io/en/latest Nextcord Server - https://discord.gg/ZebatWssCB 📜 Python-dotenv Documentation https://pypi.org/project/python-dotenv/ 📓 Python Discord Bot Template https://github.com/DenverCoder1/discord-bot-template Note: - At 8:30, the package you should install is "python-dotenv" instead of "dotenv-python." - At 9:30, "ctx" is used as a parameter when this is really a Message object and not Context. To make it more clear, I have renamed the variable to "message" in the GitHub repo. In any case, using commands is a better practice and don't use on_message at the same time as commands since they conflict. In future videos in this series, I will show you how you can: * Host your bot for free online 24/7 * Build cog modules to help make your code more maintainable * Implement a fancy Help Command * Interact with other APIs to make useful bot features * Much more Make sure to subscribe so you don't miss anything! 📺 In this video: 0:00 - Introduction 0:14 - Making a GitHub repo 1:25 - Creating the main bot structure 2:08 - Installing Discord.py 3:05 - Creating a bot user 4:17 - Creating and loading environment variables 5:48 - Creating a bot in Python 8:10 - Loading more environment variables 9:20 - Listening for messages 10:34 - Adding the bot to a Discord server 12:40 - Debugging in Visual Studio Code 14:20 - Making a ping command 16:13 - Adding command documentation 17:03 - What's Next 17:28 - Conclusion 🐍 More Discord Bot Tutorials https://youtube.com/playlist?list=PL9YUC9AZJGFG6larkQJYio_f0V-O1NRjy 💻 More tutorials https://www.youtube.com/playlist?list=PL9YUC9AZJGFHTUP3vzq4UfQ76ScBnOi-9 🙋♂️ Find me on other channels Discord 🗨️ https://bit.ly/dpt-discord Twitter ✍ https://twitter.com/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/DenverCoder1 🎁 GET FREE STUFF WHILE SUPPORTING MY TUTORIALS ► https://bit.ly/jlawrencepromos
Download
0 formatsNo download links available.