Open fishylunar opened 1 year ago
import { Client, ChannelType, GatewayIntentBits, Events, Collection, Partials } from 'discord.js' import { joinVoiceChannel } from '@discordjs/voice' import { addSpeechEvent, SpeechEvents } from 'discord-speech-recognition' const client = new Client({ intents: [ GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.DirectMessages, GatewayIntentBits.Guilds, GatewayIntentBits.GuildBans, GatewayIntentBits.GuildMessages, GatewayIntentBits.DirectMessages, GatewayIntentBits.MessageContent], partials: [ Partials.Channel, Partials.Message ] }) addSpeechEvent(client, { lang: 'en-US' })
in the messageCreate event i have this
if (message.content === 'test-join') { const voiceChannel = message.member?.voice.channel if (voiceChannel) { return joinVoiceChannel({ channelId: voiceChannel.id, guildId: voiceChannel.guild.id, adapterCreator: voiceChannel.guild.voiceAdapterCreator, selfDeaf: false }) } }
And then
client.on(SpeechEvents.voiceJoin, (out) => {console.log(out)}) client.on(SpeechEvents.speech, (msg) => { console.log('speech') // If bot didn't recognize speech, content will be empty if (!msg.content) return console.log(msg.content) // msg.author.send(msg.content) })
but none of the events fire, neither the ´voiceJoin´ nor the ´speech´ event. Am i missing something super obvious?
Having the same issue as well!
in the messageCreate event i have this
And then
but none of the events fire, neither the ´voiceJoin´ nor the ´speech´ event. Am i missing something super obvious?