diff --git a/src/lib.rs b/src/lib.rs index 2cbfc8e..c566779 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,7 +53,7 @@ impl TypeMapKey for ManifoldConfig { #[commands(ping)] struct Core; -pub async fn prepare_client(arguments: ArgMatches<'_>) -> ManifoldResult { +pub async fn prepare_client(arguments: ArgMatches<'_>, mut framework: StandardFramework) -> ManifoldResult { let bot_environment = arguments.value_of("environment").unwrap_or("Production").to_string(); let config_file = format!("config/{}", arguments.value_of("config-file").unwrap_or("manifold.json")); if arguments.occurrences_of("make-config") > 0 { @@ -102,17 +102,15 @@ pub async fn prepare_client(arguments: ArgMatches<'_>) -> ManifoldResult Err(why) => panic!("Could not get HTTP application information - exiting: {:?}", why), }; - let framework = StandardFramework::new() - .configure(|c| c + framework = framework.configure(|c| c .with_whitespace(true) .on_mention(Some(bot_id)) .prefix(&prefix) .owners(owners) .case_insensitivity(true) - ) - .before(before) - .help(&MANIFOLD_HELP) - .group(&CORE_GROUP); + ).before(before) + .help(&MANIFOLD_HELP); + framework.group_add(&CORE_GROUP); let client = Client::builder(&token) .event_handler(Handler::new())