mod commands; use clap::Subcommand; use conduit::Result; use ruma::{EventId, MxcUri}; use crate::admin_command_dispatch; #[admin_command_dispatch] #[derive(Debug, Subcommand)] pub(super) enum MediaCommand { /// - Deletes a single media file from our database and on the filesystem /// via a single MXC URL Delete { /// The MXC URL to delete #[arg(long)] mxc: Option>, /// - The message event ID which contains the media and thumbnail MXC /// URLs #[arg(long)] event_id: Option>, }, /// - Deletes a codeblock list of MXC URLs from our database and on the /// filesystem DeleteList, /// - Deletes all remote media in the last X amount of time using filesystem /// metadata first created at date. DeletePastRemoteMedia { /// - The duration (at or after), e.g. "5m" to delete all media in the /// past 5 minutes duration: String, /// Continues deleting remote media if an undeletable object is found #[arg(short, long)] force: bool, }, }