@@ -16,7 +16,7 @@ use serenity::prelude::*;
1616use std:: collections:: HashSet ;
1717use std:: sync:: Arc ;
1818use tokio:: sync:: watch;
19- use tracing:: { debug, error, info} ;
19+ use tracing:: { debug, error, info, warn } ;
2020
2121/// Hard cap on consecutive bot messages (from any other bot) in a
2222/// channel or thread. When this many recent messages are all from
@@ -205,6 +205,7 @@ impl EventHandler for Handler {
205205 } ) ;
206206
207207 // Process attachments: route by content type (audio → STT, image → encode)
208+ let mut audio_skipped = false ;
208209 if !msg. attachments . is_empty ( ) {
209210 for attachment in & msg. attachments {
210211 if is_audio_attachment ( attachment) {
@@ -216,7 +217,8 @@ impl EventHandler for Handler {
216217 } ) ;
217218 }
218219 } else {
219- debug ! ( filename = %attachment. filename, "skipping audio attachment (STT disabled)" ) ;
220+ warn ! ( filename = %attachment. filename, "skipping audio attachment (STT disabled)" ) ;
221+ audio_skipped = true ;
220222 }
221223 } else if let Some ( content_block) = download_and_encode_image ( attachment) . await {
222224 debug ! ( url = %attachment. url, filename = %attachment. filename, "adding image attachment" ) ;
@@ -225,6 +227,15 @@ impl EventHandler for Handler {
225227 }
226228 }
227229
230+ // If audio was skipped, react with 🎤 so the user knows their voice message was noticed
231+ if audio_skipped {
232+ let _ = msg. react ( & ctx. http , ReactionType :: Unicode ( "🎤" . into ( ) ) ) . await ;
233+ // Voice-only message: no text and only the sender_context block → early return
234+ if prompt. is_empty ( ) && content_blocks. len ( ) == 1 {
235+ return ;
236+ }
237+ }
238+
228239 tracing:: debug!(
229240 text_len = prompt_with_sender. len( ) ,
230241 num_attachments = msg. attachments. len( ) ,
0 commit comments