aboutsummaryrefslogtreecommitdiff
path: root/src/commands/meme/invoke.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/meme/invoke.rs')
-rw-r--r--src/commands/meme/invoke.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/commands/meme/invoke.rs b/src/commands/meme/invoke.rs
index 03c6251..13996da 100644
--- a/src/commands/meme/invoke.rs
+++ b/src/commands/meme/invoke.rs
@@ -30,37 +30,37 @@ use crate::{
#[command]
#[aliases("mem")]
pub async fn meme(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
- _meme(ctx, msg, args, AudioPlayback::Optional)
+ _meme(ctx, msg, args, AudioPlayback::Optional).await
}
#[command]
pub async fn omen(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
let args = Args::new("", &[]);
- _meme(ctx, msg, args, AudioPlayback::Optional)
+ _meme(ctx, msg, args, AudioPlayback::Optional).await
}
#[command]
pub async fn silentomen(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
let args = Args::new("", &[]);
- _meme(ctx, msg, args, AudioPlayback::Prohibited)
+ _meme(ctx, msg, args, AudioPlayback::Prohibited).await
}
#[command]
pub async fn audioomen(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
let args = Args::new("", &[]);
- _meme(ctx, msg, args, AudioPlayback::Required)
+ _meme(ctx, msg, args, AudioPlayback::Required).await
}
#[command]
#[aliases("audiomeme", "audiomem")]
pub async fn audio_meme(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
- _meme(ctx, msg, args, AudioPlayback::Required)
+ _meme(ctx, msg, args, AudioPlayback::Required).await
}
#[command]
#[aliases("silentmeme", "silentmem")]
pub async fn silent_meme(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
- _meme(ctx, msg, args, AudioPlayback::Prohibited)
+ _meme(ctx, msg, args, AudioPlayback::Prohibited).await
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
@@ -152,7 +152,7 @@ async fn rand_meme(
#[command]
#[aliases("rarememe", "raremem")]
pub async fn rare_meme(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
- let should_audio = ctx.users_listening()?;
+ let should_audio = util::users_listening(ctx).await?;
let mut conn = connection()?;
@@ -160,7 +160,7 @@ pub async fn rare_meme(ctx: &Context, msg: &Message, _args: Args) -> CommandResu
match meme {
Ok(meme) => {
InvocationRecord::create(&mut conn, msg.author.id.get(), msg.id.get(), meme.id, true)?;
- send_meme(ctx, &meme, &mut conn, msg)
+ send_meme(ctx, &meme, &mut conn, msg).await
},
Err(e) => {
match e.downcast_ref::<DieselError>() {
@@ -177,7 +177,7 @@ pub async fn rare_meme(ctx: &Context, msg: &Message, _args: Args) -> CommandResu
.map_err(CommandError::from)
.await?;
- Err(e)
+ Err(e.into())
},
}
}