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