Skip to content

Commit

Permalink
fix: support muting bots in new TTS engine (#1253)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 authored Jun 15, 2024
1 parent 065fe22 commit 02ca15c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/tts_isolate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ Future<void> isolateMain(
timestamp: messageData['timestamp'].toDate(),
deleted: false,
channelId: messageData['channelId']);
// Check if the message is from a bot and if bot messages should be muted
if (ttsModel.isBotMuted && messageModel.author.isBot) {
return; // Skip vocalization for bot messages
}
final finalMessage = ttsModel.getVocalization(
messageModel,
includeAuthorPrelude: !ttsModel.isPreludeMuted,
Expand Down

0 comments on commit 02ca15c

Please sign in to comment.