remove new parameter for CommandHandler
This commit is contained in:
@@ -12,8 +12,10 @@ pub struct MixerCommandHandler {
|
||||
}
|
||||
|
||||
impl MixerCommandHandler {
|
||||
pub fn new(commands: HashMap<String, Box<dyn MixerCommand>>) -> Self {
|
||||
Self { commands }
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
commands: HashMap::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_command<T: MixerCommand + 'static>(&mut self, command: T) {
|
||||
|
||||
@@ -25,7 +25,7 @@ pub struct MixerBot {
|
||||
impl MixerBot {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
command_handler: MixerCommandHandler::new(HashMap::new()),
|
||||
command_handler: MixerCommandHandler::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user