diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:15:42 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:16:01 -0400 |
| commit | 47817c4166937af24041a93e56ad9f841bf1e8f1 (patch) | |
| tree | a8ec0a674a5a4e5046e1bc92c1c317a48b5e4815 /src/commands/meme/mod.rs | |
| parent | ffba60b278162707bc4eb004c3bfb6b2e9595213 (diff) | |
fixups: memes working
Diffstat (limited to 'src/commands/meme/mod.rs')
| -rw-r--r-- | src/commands/meme/mod.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/commands/meme/mod.rs b/src/commands/meme/mod.rs index 24fc50d..fe69b1c 100644 --- a/src/commands/meme/mod.rs +++ b/src/commands/meme/mod.rs @@ -16,7 +16,10 @@ use serenity::{ prelude::*, }; use songbird::input::{ - core::io::MediaSource, + core::{ + io::MediaSource, + probe::Hint, + }, AudioStream, AudioStreamError, Compose, @@ -127,9 +130,12 @@ impl Compose for Audio { let ms = std::io::Cursor::new(self.data.clone()); let ms: Box<dyn MediaSource> = Box::new(ms); + let mut hint = Hint::new(); + hint.mime_type("audio/opus"); + Ok(AudioStream { input: ms, - hint: None, + hint: Some(hint), }) } |
