A simple discord bot that lets you download YouTube video's over discord.
- Download videos in
mp4
format. - Download audio in
mp3
format. - Slash commands for easy interaction.
- Python 3.8 or higher
discord.py
libraryyt-dlp
library
-
Clone this repository:
git clone https://github.com/lhwe/ytdl-pycord.git
-
Navigate to the project directory:
cd ytdl-pycord
-
Install the required Python packages:
pip install discord.py yt-dlp
-
Change the contents of
tokenHandler.py
to have your bot token:TOKEN = 'Your token goes here'
- Run the bot:
python3 ytdl-bot.py
- In Discord, use the following commands:
/help
- Displays a help message./download <url> [format]
- Downloads the video or audio from the specified YouTube URL. Format can be mp3 or mp4 (default is mp4).
- To download a video:
/download https://www.youtube.com/watch?v=dQw4w9WgXcQ
- To download audio:
/download https://www.youtube.com/watch?v=dQw4w9WgXcQ format:mp3