pub enum UserCommand {
Show 13 variants
List {
discourse: String,
listing: String,
page: u32,
format: ListFormat,
},
Info {
discourse: String,
username: String,
format: ListFormat,
},
Suspend {
discourse: String,
username: String,
until: String,
reason: String,
},
Unsuspend {
discourse: String,
username: String,
},
Silence {
discourse: String,
username: String,
until: String,
reason: String,
},
Unsilence {
discourse: String,
username: String,
},
Promote {
discourse: String,
username: String,
role: RoleArg,
},
Demote {
discourse: String,
username: String,
role: RoleArg,
},
Create {
discourse: String,
email: String,
username: String,
name: Option<String>,
password_stdin: bool,
approve: bool,
},
PasswordReset {
discourse: String,
username: String,
},
EmailSet {
discourse: String,
username: String,
email: String,
},
Activity {
discourse: String,
username: String,
since: Option<String>,
types: String,
limit: Option<u32>,
format: ActivityFormatArg,
},
Groups {
command: UserGroupsCommand,
},
}Variants§
List
List users via the admin users endpoint.
Fields
format: ListFormatOutput format.
Info
Show detailed info for a user.
Fields
format: ListFormatOutput format.
Suspend
Suspend a user.
Fields
Unsuspend
Remove a suspension from a user.
Silence
Silence a user (prevents posting; less visible than suspend).
Fields
Unsilence
Lift a silence on a user.
Promote
Grant the user the admin or moderator role.
Demote
Revoke the user’s admin or moderator role.
Create
Create a new user. --approve also marks the account approved
(needed when site requires manual approval). Password is either
supplied via stdin (--password-stdin) or omitted — in the
latter case the user will have to set one via the reset flow.
Fields
PasswordReset
Trigger Discourse’s password-reset email flow for a user.
EmailSet
Set a user’s primary email address. Requires admin scope.
Activity
Show a user’s recent public activity (topics + replies by default).
Built for the “archive my own activity to a journal forum” loop —
pipe the markdown output straight into dsc topic reply/topic new.
Fields
since: Option<String>How far back to look. Accepts 7d, 24h, 30m, 1w, 90s, or
an ISO-8601 timestamp / date. Omit to fetch everything available.
types: StringAction types to include, comma-separated. Default: topics,replies. Also recognises: mentions, quotes, likes, edits, responses.
format: ActivityFormatArgOutput format.
Groups
Manage a user’s group memberships.
Fields
command: UserGroupsCommandTrait Implementations§
Source§impl FromArgMatches for UserCommand
impl FromArgMatches for UserCommand
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for UserCommand
impl Subcommand for UserCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand