diff options
Diffstat (limited to 'src/commands/meme/create.rs')
| -rw-r--r-- | src/commands/meme/create.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/commands/meme/create.rs b/src/commands/meme/create.rs index c28f583..185e1f6 100644 --- a/src/commands/meme/create.rs +++ b/src/commands/meme/create.rs @@ -68,7 +68,7 @@ pub async fn addmeme( use diesel::result::DatabaseErrorKind; match save_result { Ok(_) => { - util::react(ctx, ReactionType::Unicode("👌".to_string())).await?; + util::react(ctx, '👌').await?; }, Err(e) => { if let Some(DieselError::DatabaseError(DatabaseErrorKind::UniqueViolation, _)) = @@ -76,7 +76,7 @@ pub async fn addmeme( { error!("tried to create meme that already exists"); - util::react(ctx, ReactionType::Unicode("❌".to_owned())).await?; + util::react(ctx, '❌').await?; util::reply(ctx, "that meme already exists").await?; return Ok(()); @@ -110,6 +110,8 @@ pub async fn addaudiomeme( let opts = elems[1..].join(" "); let (start, end) = parse_times(opts); + util::react(ctx, '🔃').await?; + let youtube_url = util::ytdl_url(audio_link.as_str()).await?; debug!("got download url: {youtube_url}"); @@ -169,6 +171,7 @@ pub async fn addaudiomeme( if bytes == 0 { debug!("read 0 bytes from audio reader"); + util::unreact(ctx, '🔃').await?; util::reply(ctx, "🔇🔇🔇🔕🔕🔕🔕🔕🔇🔕🔕🔇🔕🔕📣📢📣📢📣").await?; return Ok(()); } @@ -186,6 +189,8 @@ pub async fn addaudiomeme( .await .map(|_| {}); + util::unreact(ctx, '🔃').await?; + use diesel::result::DatabaseErrorKind; match save_result { Ok(_) => { |
