A simple discord.py bot that converts YouTube videos to downloadable media using pytube
Install the required packages with pip:
python -m pip install -r requirements.txt
TOKEN=YOUR_DISCORD_TOKEN
python bot.py
Once it's online, use .help
to see the list of commands (either through a private or a guild channel message)
- This bot only have the basic functionalities as it's not fully complete
- This bot sends the fetched media as attached files. That said, keep in mind that discord's file size limit is >8MB and it's not possible to be bypassed. The recommended option to fix that is by using a server to host files and providing their links to download instead of attaching them directly to discord
- Currently the only accepted media formats are
mp3
andmp4
. You can change it by yourself once you're aware of this bot backend operations and pytube documentation as well - There's no download/connection error handling. Only basic errors are handled
asyncio
discord.py
moviepy
python-dotenv
pytube