Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ async def mycommand(self, ctx):
- **secret_santa/**: Secret Santa event management with participant matching, anonymous messaging, and gift tracking (no external deps)
- **tgmc/**: API interface for TGMC game (requires: httpx, but not specified in info.json)
- **user/**: Bot user management with nickname and avatar commands (no external deps)
- **video_dl/**: Download videos from YouTube, TikTok, and Instagram via DM for bot owner only (requires: yt-dlp>=2023.1.1)
- **video_dl/**: Download videos from YouTube, TikTok, and Instagram via DM for bot owner only (requires: yt-dlp>=2023.1.1, system: ffmpeg)

## Dependencies and Installation

Expand Down Expand Up @@ -267,6 +267,9 @@ pip3 install Pillow>=10.2.0

# For video_dl cog (video downloading)
pip3 install yt-dlp>=2023.1.1
# System dependency for video_dl (required for merging video/audio streams)
sudo apt-get install ffmpeg # Ubuntu/Debian
# brew install ffmpeg # macOS

# For Discord functionality (if testing imports)
pip3 install discord.py
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
pip install Red-DiscordBot
- name: Install common cog dependencies
run: |
pip install cinemagoer==2022.12.27 httpx discord.py python-a2s>=1.3.0 Pillow>=10.2.0
pip install cinemagoer==2022.12.27 httpx discord.py python-a2s>=1.3.0 Pillow>=10.2.0 yt-dlp>=2023.1.1
- name: Test cog imports
run: |
python -c "from redbot.core import commands; print('✓ Red-DiscordBot core imports working')"
Expand All @@ -49,6 +49,10 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Install test dependencies
run: |
pip install -r requirements-test.txt
Expand Down
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,49 @@ Interface for the TGMC (TerraGov Marine Corps) game API.

---

### Video Downloader

Download videos from YouTube, TikTok, and Instagram via DM for bot owner only.

**Requirements:**
- Python: `yt-dlp>=2023.1.1`
- System: `ffmpeg` (required for merging video and audio streams)

**Installation:**

First, install ffmpeg on your system:

```bash
# Ubuntu/Debian
sudo apt-get install ffmpeg

# macOS
brew install ffmpeg

# Windows
# Download from https://ffmpeg.org/download.html
```

Then install the cog:

```
[p]cog install psykzz-cogs video_dl
[p]load video_dl
```

**Usage:**

Simply send a YouTube, TikTok, or Instagram URL to the bot via DM. The bot will download the video and send it back to you as a Discord attachment (max 25MB).

**Supported platforms:**
- YouTube (videos and shorts)
- TikTok
- Instagram (reels and posts)

**Note:** This cog only responds to DMs from the bot owner.

---

### User

Manage bot user settings (nickname and avatar).
Expand Down
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ httpx>=0.14.1
cinemagoer==2022.12.27
python-a2s>=1.3.0
Pillow>=10.2.0
yt-dlp>=2023.1.1
3 changes: 2 additions & 1 deletion video_dl/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"author": ["psykzz"],
"name": "VideoDownloader",
"short": "Download videos from DMs for bot owner",
"description": "Downloads videos from YouTube, TikTok, and Instagram when sent via DM by the bot owner. Uses yt-dlp to download videos and sends them back as Discord attachments.",
"description": "Downloads videos from YouTube, TikTok, and Instagram when sent via DM by the bot owner. Uses yt-dlp to download videos and sends them back as Discord attachments. Requires ffmpeg to be installed on the system for merging video and audio streams.",
"permissions": ["Send Messages", "Attach Files"],
"requirements": ["yt-dlp>=2023.1.1"],
"system_dependencies": ["ffmpeg"],
"tags": [
"Video",
"Download",
Expand Down
Loading