diff --git a/src/bin/modiom/commands/info.rs b/src/bin/modiom/commands/info.rs index 750658a..379d365 100644 --- a/src/bin/modiom/commands/info.rs +++ b/src/bin/modiom/commands/info.rs @@ -3,6 +3,7 @@ use prettytable::format; use textwrap::fill; use tokio::runtime::Runtime; +use modio::types::id::{GameId, ModId}; use modiom::config::Config; use crate::command_prelude::*; @@ -15,14 +16,14 @@ pub fn cli() -> Command { .help("Unique id of a game.") .value_name("GAME") .required(true) - .value_parser(value_parser!(u32)), + .value_parser(value_parser!(GameId)), ) .arg( Arg::new("mod") .help("Unique id of a mod.") .value_name("MOD") .required(true) - .value_parser(value_parser!(u32)), + .value_parser(value_parser!(ModId)), ) .arg(opt("files", "List all files.").action(ArgAction::SetTrue)) .arg(opt("stats", "Show the statistics.").action(ArgAction::SetTrue)) diff --git a/src/bin/modiom/commands/search.rs b/src/bin/modiom/commands/search.rs index 18d10e8..025e657 100644 --- a/src/bin/modiom/commands/search.rs +++ b/src/bin/modiom/commands/search.rs @@ -3,6 +3,7 @@ use tokio::runtime::Runtime; use modio::filter::custom_filter; use modio::filter::prelude::*; +use modio::types::id::GameId; use modiom::config::Config; use crate::command_prelude::*; @@ -17,7 +18,7 @@ pub fn cli() -> Command { "When specified, modiom will search for mods of the game.", ) .value_name("ID") - .value_parser(value_parser!(u32)), + .value_parser(value_parser!(GameId)), ) .arg( opt("id", "Specify the id of the game or mod.") diff --git a/src/bin/modiom/commands/subs.rs b/src/bin/modiom/commands/subs.rs index 6e2169a..1ee19ed 100644 --- a/src/bin/modiom/commands/subs.rs +++ b/src/bin/modiom/commands/subs.rs @@ -30,14 +30,14 @@ pub fn cli() -> Command { .help("Unique id of a game.") .value_name("GAME") .required(true) - .value_parser(value_parser!(u32)), + .value_parser(value_parser!(id::GameId)), ) .arg( Arg::new("mod") .help("Unique id of a mod.") .value_name("MOD") .required(true) - .value_parser(value_parser!(u32)), + .value_parser(value_parser!(id::ModId)), ), ) .subcommand( @@ -48,14 +48,14 @@ pub fn cli() -> Command { .help("Unique id of a game.") .value_name("GAME") .required(true) - .value_parser(value_parser!(u32)), + .value_parser(value_parser!(id::GameId)), ) .arg( Arg::new("mod") .help("Unique id of a mod.") .value_name("MOD") .required(true) - .value_parser(value_parser!(u32)), + .value_parser(value_parser!(id::ModId)), ), ) } diff --git a/src/bin/modiom/commands/upload.rs b/src/bin/modiom/commands/upload.rs index bf51d6e..0674c1f 100644 --- a/src/bin/modiom/commands/upload.rs +++ b/src/bin/modiom/commands/upload.rs @@ -9,6 +9,7 @@ use tokio::runtime::Runtime; use tokio_util::io::ReaderStream; use modio::files::AddFileOptions; +use modio::types::id::{GameId, ModId}; use modiom::config::Config; use modiom::md5::Md5; @@ -22,14 +23,14 @@ pub fn cli() -> Command { .help("Unique id of the game.") .value_name("GAME") .required(true) - .value_parser(value_parser!(u32)), + .value_parser(value_parser!(GameId)), ) .arg( Arg::new("mod") .help("Unique id of the mod.") .value_name("MOD") .required(true) - .value_parser(value_parser!(u32)), + .value_parser(value_parser!(ModId)), ) .arg(opt("filename", "Overwrite the filename.").value_name("NAME")) .arg(opt("version", "Version of this file release.").value_name("VERSION"))