slack_transfer.functions.download.download_channel_history#

slack_transfer.functions.download.download_channel_history(client: DownloaderClientABC, channel_id: str, channel_name: str, latest: Optional[str] = None, ts_progress_bar: Optional[tqdm] = None, ts_now: Optional[int] = None, auto_join: bool = True) None[source]#

download and save a series of channel histories on a channel.

The file will be saved as file_id–file_name. Most parameters are specified by slack and this method isn’t used by users.

Parameters:
  • client (DownloaderClientABC) – downloader client. If use this via any DownloaderClient Class, self is automatically set. Thus, ignore this.

  • channel_id (str) – channel id (usually 9-digits string)

  • channel_name (str) – channel name. Please set it correctly. Usually this can be obtained using channel_id. But, because it is usually redundant, please set from outside.

  • latest (str; Optional; default=None) – the latest time of the time range you want to fetch. Set as float-like string representing unix timetamp including floating point.

  • (tqdm.tqdm (ts_progress_bar) – Optional; default=None): progress bar instance. Progress bar will be updated using the diff between ts_now and the oldest fetched history.

  • ts_now (int; Optional; default=None) – anchor point to calculate the progress. It is required when ts_progress_bar is set.

  • auto_join (bool; Optional; default=True) – when bot is not in channel, automatically join if possible (public channel).