if condition issue

This commit is contained in:
kimpure 2026-05-19 18:08:13 +00:00
parent caa6db37ce
commit f24cfdceaa
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ export default defineEvent("messageCreate", async (message) => {
); );
} else { } else {
for (const text of content.split("\n")) { for (const text of content.split("\n")) {
await playVoice(guild, profile, voice, text); await playVoice(guild, profile, voice, text, options);
} }
} }

View file

@ -64,7 +64,7 @@ export async function playVoice(
if (!connection) if (!connection)
throw new Error("Yaeju is not joined VoiceChat"); 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`); throw new Error(`the user ${profile.userId} is can't use typecast voice`);
} }