% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/channel_downloads.R
\name{download_channel_media}
\alias{download_channel_media}
\title{Download Channel Media By Channel}
\usage{
download_channel_media(
  client,
  channel,
  limit = Inf,
  start_date = NULL,
  end_date = NULL,
  media_types = c("photo", "video", "image", "document"),
  out_dir = NULL,
  show_progress = TRUE,
  wait_time = 0,
  retries = 1,
  include_errors = TRUE,
  use_original_filename = FALSE,
  ...
)
}
\arguments{
\item{client}{TelegramClient instance.}

\item{channel}{character or numeric. Channel username (with or without "@") or numeric id.}

\item{limit}{integer or Inf. Maximum number of messages to fetch.}

\item{start_date}{POSIXct/Date/character. Earliest date to include (UTC).}

\item{end_date}{POSIXct/Date/character. Latest date to include (UTC).}

\item{media_types}{character vector. Media types to download (e.g. "photo", "video", "document", "image", "audio").}

\item{out_dir}{character. Required. Directory to save files into (e.g. \code{tempdir()}).}

\item{show_progress}{logical. If TRUE, display a progress bar.}

\item{wait_time}{numeric. Seconds to sleep between requests to avoid flood waits.}

\item{retries}{integer. Number of retries per media download on failure.}

\item{include_errors}{logical. If TRUE, include error messages per row.}

\item{use_original_filename}{logical. If TRUE and a document has a filename attribute,
use it for the saved file name.}

\item{...}{Passed to client$iter_messages() (e.g. offset_id, max_id, min_id).}
}
\value{
A tibble with message_id, channel info, media_type, file_path, and original_filename.
}
\description{
Downloads media (photos/videos/documents) from a channel by username or numeric id
and returns a tibble with file paths.
}
