pub struct SendArgs {
pub chat: Option<String>,
pub stdin: bool,
pub files: Vec<PathBuf>,
pub body: Option<String>,
pub json: bool,
pub dry_run: bool,
}Fields§
§chat: Option<String>Destination chat: a signed integer chat_id (groups/supergroups
are negative), a @username for public channels, or a
directory alias.
stdin: boolRead the message body from standard input instead of the positional argument.
files: Vec<PathBuf>Attach a file to the message. Repeat up to Telegram’s
sendMediaGroup cap of 10 to attach multiple files. With one
file the message is sent via sendDocument; with 2+ files it
becomes a sendMediaGroup. The body (if any) is sent as the
caption on the first item; with attachments present Telegram’s
1024-character caption cap applies instead of the 4096-character
plain-text cap.
body: Option<String>Message body. Required unless --stdin is set or at least one
--file is attached.
json: boolEmit machine-readable JSON instead of human-readable text.
dry_run: boolPreview the outgoing call without contacting the Bot API. Scope and permission checks still run; no bot token is loaded.
Trait Implementations§
Source§impl Args for SendArgs
impl Args for SendArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for SendArgs
impl FromArgMatches for SendArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.