diff --git a/src/bot/commands/creator.rs b/src/bot/commands/creator.rs index 804873e..1a457c7 100644 --- a/src/bot/commands/creator.rs +++ b/src/bot/commands/creator.rs @@ -24,7 +24,7 @@ impl MixerCommand for CreatorCommand { fn create(&self, command: &mut CreateApplicationCommand) { command .name(self.name()) - .description("Hello world!") + .description("Some handful commands for the bot's creator!") .create_option(|option| { option .name("verify") @@ -54,7 +54,7 @@ impl MixerCommand for CreatorCommand { if !has_permission { interaction - .create_interaction_response(&ctx.http, |response| { + .create_interaction_response(ctx, |response| { response .kind(InteractionResponseType::ChannelMessageWithSource) .interaction_response_data(|message| { @@ -105,7 +105,7 @@ impl CreatorCommand { } interaction - .create_interaction_response(&ctx.http, |response| { + .create_interaction_response(ctx, |response| { response .kind(InteractionResponseType::ChannelMessageWithSource) .interaction_response_data(|message| { diff --git a/src/bot/commands/rating.rs b/src/bot/commands/rating.rs index 30d7f2f..86c1f4c 100644 --- a/src/bot/commands/rating.rs +++ b/src/bot/commands/rating.rs @@ -83,7 +83,7 @@ impl MixerCommand for RatingCommand { User(user, _) => user, _ => { interaction - .create_interaction_response(&ctx.http, |response| { + .create_interaction_response(ctx, |response| { response .kind(InteractionResponseType::ChannelMessageWithSource) .interaction_response_data(|message| { diff --git a/src/bot/handlers/command_handler.rs b/src/bot/handlers/command_handler.rs index 5363a27..98c5925 100644 --- a/src/bot/handlers/command_handler.rs +++ b/src/bot/handlers/command_handler.rs @@ -12,8 +12,10 @@ pub struct MixerCommandHandler { } impl MixerCommandHandler { - pub fn new(commands: HashMap>) -> Self { - Self { commands } + pub fn new() -> Self { + Self { + commands: HashMap::new(), + } } pub fn add_command(&mut self, command: T) { @@ -49,7 +51,7 @@ impl MixerCommandHandler { interaction.user.name, interaction.user.id, interaction.data.name ); interaction - .create_interaction_response(&ctx.http, |response| { + .create_interaction_response(ctx, |response| { response .kind(InteractionResponseType::ChannelMessageWithSource) .interaction_response_data(|message| { diff --git a/src/bot/mod.rs b/src/bot/mod.rs index 6963ef3..cae78d6 100644 --- a/src/bot/mod.rs +++ b/src/bot/mod.rs @@ -25,7 +25,7 @@ pub struct MixerBot { impl MixerBot { pub fn new() -> Self { Self { - command_handler: MixerCommandHandler::new(HashMap::new()), + command_handler: MixerCommandHandler::new(), } } @@ -121,7 +121,7 @@ impl EventHandler for MixerBot { } Interaction::MessageComponent(component) => { component - .create_interaction_response(ctx.http(), |response| { + .create_interaction_response(ctx, |response| { response.kind(InteractionResponseType::DeferredUpdateMessage) }) .await