diff options
Diffstat (limited to 'src/framework/standard/create_group.rs')
| -rw-r--r-- | src/framework/standard/create_group.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/framework/standard/create_group.rs b/src/framework/standard/create_group.rs index 3cd4047..037dc64 100644 --- a/src/framework/standard/create_group.rs +++ b/src/framework/standard/create_group.rs @@ -198,11 +198,11 @@ impl CreateGroup { /// Adds a command for a group that will be executed if no command-name /// has been passed. pub fn default_cmd<C: Command + 'static>(mut self, c: C) -> Self { - let cmd: Arc<Command> = Arc::new(c); - - self.0.default_command = Some(CommandOrAlias::Command(Arc::clone(&cmd))); + c.init(); - cmd.init(); + let cmd_with_group_options = self.build_command().cmd(c).finish(); + let cmd_finished = CommandOrAlias::Command(cmd_with_group_options); + self.0.default_command = Some(cmd_finished); self } |