Closed J3SUCR1ST0 closed 2 years ago
Hi! If I understand you right, the easiest way to do this is to check if voice message content starts with special world, like "andrea". I made music bot, that accepts voice commands only if they start with "alexa". You can check the repository here: https://github.com/Rei-x/discord-music-voice-control
Basically, check if message content starts with this special word and then do whatever you want. Here is code example:
client.on("speech", async (message) => {
if (!message.content) return;
if (!message.content.toLowerCase().startsWith("andrea")) return;
doSomething()
}
That's what you meant?
gonna try that ty so much
hi mate, first of all ty for creating this, it´s really usefull. i have question for u, i want the bot to start the speech recognition when it hears a special word like "andrea" for example, because it stats the speech recogniton every time someone stops talking. my english id bad, if you dont understand something let me know