osu: Always load Me as a follow-up response

This commit is contained in:
Natsu Kagami 2024-09-25 18:30:07 +02:00
parent 76fd6c803d
commit 24e476239c
Signed by: nki
GPG key ID: 55A032EB38B49ADB
3 changed files with 73 additions and 75 deletions

View file

@ -26,13 +26,13 @@ where
/// InteractionHook represents the asynchronous hook that is run on every interaction.
#[async_trait]
pub trait InteractionHook: Send + Sync {
async fn call(&mut self, ctx: &Context, interaction: &Interaction) -> Result<()>;
async fn call(&self, ctx: &Context, interaction: &Interaction) -> Result<()>;
}
#[async_trait]
impl<T> InteractionHook for T
where
T: for<'a> FnMut(
T: for<'a> Fn(
&'a Context,
&'a Interaction,
)
@ -40,7 +40,7 @@ where
+ Send
+ Sync,
{
async fn call(&mut self, ctx: &Context, interaction: &Interaction) -> Result<()> {
async fn call(&self, ctx: &Context, interaction: &Interaction) -> Result<()> {
self(ctx, interaction).await
}
}