From f24cfdceaaa09bc1996d74ffeca2092b813c516f Mon Sep 17 00:00:00 2001 From: kimpure Date: Tue, 19 May 2026 18:08:13 +0000 Subject: [PATCH] if condition issue --- packages/bot/events/readChannel.ts | 2 +- packages/bot/tts.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bot/events/readChannel.ts b/packages/bot/events/readChannel.ts index 5eaef33..5ad927e 100644 --- a/packages/bot/events/readChannel.ts +++ b/packages/bot/events/readChannel.ts @@ -62,7 +62,7 @@ export default defineEvent("messageCreate", async (message) => { ); } else { for (const text of content.split("\n")) { - await playVoice(guild, profile, voice, text); + await playVoice(guild, profile, voice, text, options); } } diff --git a/packages/bot/tts.ts b/packages/bot/tts.ts index f2f5394..aeb1a14 100644 --- a/packages/bot/tts.ts +++ b/packages/bot/tts.ts @@ -64,7 +64,7 @@ export async function playVoice( if (!connection) throw new Error("Yaeju is not joined VoiceChat"); - if (voice == "TypeCast" && profile.canTypecast) { + if (voice == "TypeCast" && !profile.canTypecast) { throw new Error(`the user ${profile.userId} is can't use typecast voice`); }