Skip to content

Repository files navigation

Ultimate Media Manager | Telegram Bot

See social media posts right in the Telegram Messenger.

Features

  • Media downloading
    • Instagram
    • TikTok
    • YouTube Shorts
    • Facebook
    • LinkedIn
    • Reddit
    • Twitter (X)
    • Pinterest
    • SoundCloud
  • Unified /download command for direct downloads

Usage

Media Downloading

  1. Open a private chat with @UMMRobot or add it to a group chat
  2. Send any supported social media post link to the chat

Direct Downloading

  1. Open a private chat with @UMMRobot or add it to a group chat
  2. Use /download link or just /download in reply to the message containing a link
  3. Or mention the bot in that reply to trigger the same download flow without the slash command

Development

SigNoz dashboard SQL for usage, unique users, unique downloads, and all-time bucket statistics is documented in telemetry/README.md.

  • Install Deno 2
  • Copy .env.example to .env and configure the bot token, cache chat ID, and MongoDB connection
  • Install ffmpeg for Postfetch MP4 normalization outside the app container
  • Start the bot with deno task start
  • Run checks with deno task check
  • Format and apply lint fixes with deno task format
  • Check formatting, lint, and types with deno task verify
  • Run tests with deno task test
  • Runtime tasks load local variables from .env via Deno's --env-file

Local development

Set WARP_PROXY=socks5://127.0.0.1:1080 in .env, then deno task dev:local starts the WARP sidecar and the bot together (and stops the sidecar on exit). Or run the pieces yourself with deno task warp + deno task dev, or the full container setup with docker compose up.

Media resolution

  • Media is resolved in-process by postfetch. Download failures are reported directly, so resolver issues can be diagnosed and fixed in Postfetch.
  • X website preview images supplied by Postfetch 0.12.5 and newer are downloaded and shown below their post's text, attachments, and quoted content, outside attachment slideshows. Parent-post previews are not downloaded.
  • Open /settings to change settings using rich-message buttons. Each setting has an Enabled button in green or a Disabled button in red beside its label; tap it to toggle and refresh the message in place. Settings apply to the current group or your private chat. Admin-only settings still require the bot admin.
  • Photo/video slideshows with a soundtrack are sent as one video by default, with a minimum of one second per item. Actual time per item is the larger of the selected minimum and audio length divided by slide count, so the whole track plays. Shorter audio loops when needed. The slideshow status button turns conversion off or back on at a one-second minimum; the 1s–10s button rows appear directly below the toggle only while conversion is enabled and select a minimum. Existing /set_sld_on, /set_sld_off, and /set_sld_0–/set_sld_10 commands still work. Existing chats inherit the default automatically. Cached media is kept separately for each selected minimum.
  • Soundtrack conversion is shared by every platform and includes a single photo with audio. Each Postfetch resolver must supply the visuals followed by an audio item. Instagram soundtrack extraction and selected-segment playback are implemented in the sibling Postfetch checkout; test them with deno task test:postfetch until a core release includes them. Public Instagram responses can omit the soundtrack and require login for the richer lookup, leaving only the photo available.
  • WARP_PROXY configures the Cloudflare WARP SOCKS5 proxy provided by the warp/ sidecar. Leave it empty to fetch directly.
  • WARP_ROTATE_MINUTES controls sidecar account rotation (compose.yml defaults to 30; 0 disables rotation).
  • The WARP sidecar keeps its profile in the warp-state volume across deployments. Initial registration retries with a 10–60 second backoff; failed rotations preserve the working proxy.

License

Licensed under the GNU General Public License v3.0.

X and Reddit comments

An integer immediately after an X or Reddit link requests that many replies, for example Check this: https://x.com/paularambles/status/2097547797444911520?s=20 5, cool?. Replies use nested “Comments” / “More” disclosures: text comments share up to 750 characters per section; media comments occupy a section alone with their first attachment. Oversized comments stay intact. A single section is shown directly, and at most 10 sections are retained. Comment download failures leave the original post usable. If sending fails, UMM retries with 5%, 10%, then 50% fewer comments than the first attempt, then without comments. Counts are rounded down and duplicate counts are skipped. These retries reuse downloaded media and remove attachments belonging to omitted comments; they never download the post again. Requests for comments bypass the URL cache.

X and Reddit comments are supported by Postfetch 0.12.0 and newer. To test both working copies before a future release, run deno task test:postfetch (or bash scripts/test-local-postfetch.sh /path/to/postfetch). The local test command uses a temporary import configuration and test credentials.