aboutsummaryrefslogtreecommitdiff
path: root/src/commands/meme.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/meme.rs')
-rw-r--r--src/commands/meme.rs23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/commands/meme.rs b/src/commands/meme.rs
index 064486d..5dbd831 100644
--- a/src/commands/meme.rs
+++ b/src/commands/meme.rs
@@ -466,16 +466,21 @@ fn send_meme(ctx: &Context, t: &Meme, conn: &PgConnection, msg: &Message) -> Res
// not worrying about it
if let Some(audio) = audio {
let audio = audio?;
- let queue_lock = ctx.data.lock().get::<PlayQueue>().cloned().unwrap();
- let mut play_queue = queue_lock.write().unwrap();
- play_queue.meme_queue.push_back(PlayArgs{
- initiator: msg.author.name.clone(),
- data: ::either::Right(audio.data.clone()),
- sender_channel: msg.channel_id,
- start: None,
- end: None,
- });
+ {
+ let queue_lock = ctx.data.lock().get::<PlayQueue>().cloned().unwrap();
+ let mut play_queue = queue_lock.write().unwrap();
+
+ play_queue.meme_queue.push_back(PlayArgs{
+ initiator: msg.author.name.clone(),
+ data: ::either::Right(audio.data.clone()),
+ sender_channel: msg.channel_id,
+ start: None,
+ end: None,
+ });
+ }
+
+ msg.react("📣")?;
}
Ok(())