Create a Discord Music Bot [Python]

Опубликовано: 21 Октябрь 2024
на канале: Ethan | The Code Syndicate
13,958
350

Today we'll be making a Discord music bot that plays audio from YouTube videos! It's a long ride to get this going, so be sure to grab a coffee and strap in for this video.

*DISCLAIMER*
This video is for educational purposes ONLY. Anything produced by this video should respect YouTube guidelines on streaming and downloading videos. Bots made using this content are not to be distributed, both non-commercially and commercially.

FFmpeg download: https://www.gyan.dev/ffmpeg/builds/

GitHub files: https://github.com/MasterReach1/disco...

Timeline:
00:00 Building the bot on Discord
01:46 Setting up for the code
02:05 Downloading FFmpeg
02:30 Setting FFmpeg path as environment variable
03:39 Install required packages
04:50 Set up run_bot()
04:54 Load .env variables
05:12 Discussing .env
06:45 Setting up variables
08:44 Setting up on_ready()
09:00 Setting up on_message()
09:15 Setting up ?play command
13:12 First error
13:42 First successful test
14:15 Adding ?pause command and others
15:30 Second successful test
15:55 Outro