diff options
Diffstat (limited to 'src/commands/meme/mod.rs')
| -rw-r--r-- | src/commands/meme/mod.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/commands/meme/mod.rs b/src/commands/meme/mod.rs index 603ec28..98cabef 100644 --- a/src/commands/meme/mod.rs +++ b/src/commands/meme/mod.rs @@ -15,14 +15,14 @@ use serenity::{ }, }; use songbird::input::{ - core::{ - io::MediaSource, - probe::Hint, - }, AudioStream, AudioStreamError, Compose, Input, + core::{ + io::MediaSource, + probe::Hint, + }, }; pub use self::{ @@ -32,12 +32,13 @@ pub use self::{ invoke::*, }; use crate::{ + PoiseContext, bot::PlaybackKey, commands::{ playback, playback::{ - songbird, InvokeInfo, + songbird, }, }, db::{ @@ -45,7 +46,6 @@ use crate::{ Meme, }, util, - PoiseContext, }; mod create; @@ -78,8 +78,8 @@ async fn send_meme( t: &Meme, conn: &mut AsyncPgConnection, ) -> anyhow::Result<()> { - let should_tts = - t.content.as_ref().map(|t| !t.is_empty()).unwrap_or(false) && random::<u32>() % 25 == 0; + let should_tts = t.content.as_ref().map(|t| !t.is_empty()).unwrap_or(false) + && random::<u32>().is_multiple_of(25); tracing::debug!(should_tts, meme = ?t, "sending meme"); |
