Closed FaxBRz closed 2 years ago
const client = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_VOICE_STATES],
});
addSpeechEvent(client, { lang: "pl-PL" });
you just need to pass second argument to addSpeechEvent
function, in example above it uses polish language
this is the list of language codes (most of them should work): http://www.lingoes.net/en/translator/langcode.htm
if you still have some trouble with setting this up, don't hesitate to ask
It worked perfectly, thanks, however sometimes I get the error "cannot send empty message" and the bot crashes
client.on("speech", async (msg) => {
if (!msg.content) return;
msg.author.send(msg.content);
});
Just check if message content is truthy, sometimes it can be undefined or empty string (when module didn't recognize speech properly).
It worked perfectly, thank you very much.
Would there be a way to explain to a layman, how do I make the module accept another spoken language?