Skip to content

Add dynamic upload limits based on server boost level with catbox.moe fallback#139

Merged
psykzz merged 4 commits intomainfrom
claude/set-upload-limit-based-on-level
Apr 16, 2026
Merged

Add dynamic upload limits based on server boost level with catbox.moe fallback#139
psykzz merged 4 commits intomainfrom
claude/set-upload-limit-based-on-level

Conversation

@Claude
Copy link
Copy Markdown
Contributor

@Claude Claude AI commented Apr 16, 2026

Implements dynamic file size limits for video downloads based on Discord server boost level, with automatic fallback to catbox.moe for oversized files.

Changes

  • Dynamic upload limits: File size limits now scale with server boost level (Level 1: 10MB, Level 2: 50MB, Level 3: 100MB, Non-boosted: 25MB)
  • Catbox.moe fallback: Files exceeding Discord limits but under 200MB are automatically uploaded to catbox.moe and shared as links
  • Configurable failure handling: Emoji reactions (default: 💥) for files exceeding catbox.moe's 200MB limit
  • New commands:
    • /videodl setcatbox <userhash> - Configure catbox.moe authentication
    • /videodl setemoji <emoji> - Customize the too-large file reaction
  • Enhanced status: /videodl status now shows boost level, current file size limit, and catbox configuration

Example

# Automatic handling based on file size:
# 1. ≤ boost limit → Upload directly to Discord
# 2. > boost limit but ≤ 200MB → Upload to catbox.moe, post link
# 3. > 200MB or catbox fails → React with configured emoji

Dependencies: Added catboxpy>=0.0.5 to support external hosting.

Claude AI and others added 2 commits April 16, 2026 15:14
Comment thread video_dl/video_dl.py Outdated
@psykzz
Copy link
Copy Markdown
Owner

psykzz commented Apr 16, 2026

@copilot fix tests

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

@copilot fix tests

Fixed in 81746c3. The two failing tests needed os.path.getsize mocked (since on_message now checks file size after download), and MockGuild needed a premium_tier attribute to support the new boost-level size limit logic.

Copilot AI requested a review from psykzz April 16, 2026 15:28
@psykzz psykzz marked this pull request as ready for review April 16, 2026 15:46
@psykzz psykzz merged commit 587188f into main Apr 16, 2026
3 checks passed
@psykzz psykzz deleted the claude/set-upload-limit-based-on-level branch April 16, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants