Rei-x / discord-speech-recognition

Speech to text extension for discord.js
https://npmjs.com/package/discord-speech-recognition
MIT License
56 stars 22 forks source link

Add custom check for speech recognition #41

Closed Rei-x closed 1 year ago

Rei-x commented 1 year ago

New option in addSpeechEvent function that allows custom check if speech should be processed. Example usage:

addSpeechEvent(client, {
  shouldProcessSpeech: (user) => {
    if (user.username === "awesomeNickname") {
      return true;
    }
    return false;
  }
})

Speech will be processed only when someone with "awesomeNickname" said something

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication