Code Monkey home page Code Monkey logo

Comments (4)

Potatocrip avatar Potatocrip commented on August 10, 2024 1

Not sure if this is a problem on my end, but I've had a few instances where the notif sound is very delayed and plays long after a keyword is sent-- or sometimes the notif sound will just play for no reason at all.
Also, a visual notification would be cool too, like there's actually a @mention in the channel where the keyword was sent!

from keywordtracker.

sarahkittyy avatar sarahkittyy commented on August 10, 2024

Not sure if this is a problem on my end, but I've had a few instances where the notif sound is very delayed and plays long after a keyword is sent-- or sometimes the notif sound will just play for no reason at all.
Also, a visual notification would be cool too, like there's actually a @mention in the channel where the keyword was sent!

I'm not sure if this is an issue on my end either? The code that all notifications use is right here:

this.sendMatchNotification(
  `https://cdn.discordapp.com/avatars/${message.author.id}/${message.author.avatar}.webp?size=256`,
  `User match in ${guild}!`,
  `${message.author.username} typed in #${channel.name}.`,
  `/channels/${message.guild_id}/${channel.id}/${message.id}`
);
if (this.settings.notifications) {
  Modules.SoundModule.playSound("message1", 0.4);
}

Nothing here would imply that there's any reason for there to be a delay between notification and sound, and so I'd bet it's a fault of the library I use to play the sound in the first place: https://github.com/rauenzi/BDPluginLibrary

from keywordtracker.

Potatocrip avatar Potatocrip commented on August 10, 2024

Hey so I'm dumb and I realized what caused the seemingly random/delayed pings
It's just because the keyword I added happens to be a component in some other separate words. So, like... "ring" inside of "spring" or something along those lines-- if "ring" was a keyword and "spring" was said, it'd trigger the ping. I hadn't considered that beforehand. My bad!

from keywordtracker.

sarahkittyy avatar sarahkittyy commented on August 10, 2024

@Potatocrip Haha, it happens. You can use regex to get around that, i.e. if you want to match only the word "ring" as an individual word, you can do /\bring\b/i which will match two word boundaries (\b) around the word ring.

from keywordtracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.