if condition issue
This commit is contained in:
parent
caa6db37ce
commit
f24cfdceaa
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue