Discord Keyword Notification

Displays a browser notification whenever a user mentions specific textual word(s) in a channel. The script must be manually edited to configure the keywords.

< 脚本Discord Keyword Notification的反馈

提问/评论

§
发表于:2020-08-24
编辑于:2020-08-24

apart from the change of the server name (to discord.com)
the part
selector = '[class^="messagesWrapper-"] [class*="messages-"]'
needs to be changed to
selector = '[class^="scrollerInner-"]'
and the delay (500 in the original code) in
setInterval(function() {
...
}, 500);
must be much bigger (i use 5000 = 5 seconds) due to the little hint screen at load up
i changed also parts of the notifications, but those modifications above should unbreak the script

§
发表于:2020-10-25
编辑于:2020-10-25

Hello and sorry to bother, but I don't seem to be able to get the script to work
I tried messing with the code, from changing the selector argument to trying different ways of writing the values for the matches argument
Any idea of what I might be doing wrong?

§
发表于:2021-02-16
Hello and sorry to bother, but I don't seem to be able to get the script to work
I tried messing with the code, from changing the selector argument to trying different ways of writing the values for the matches argument
Any idea of what I might be doing wrong?

Actually it's work for me, changed selector and here we go. So full string must look like this:
var observer, observing, selector = '[class^="scrollerInner-"]', matches = [];

Don't forget to setup you own words to observe, like this:
var keywordsRegexp = /myword|anotherword/gi;

§
发表于:2021-03-13

I modified the code just like you told and the code is running but I am still not getting notifications. Can someone supply us with a working code please?

发表回复

登录以发表回复。