jojos38 / word-notification-improved Goto Github PK
View Code? Open in Web Editor NEWA remake of the Word Notification plugin by Qwerasd, it notifies you when certain words are said
A remake of the Word Notification plugin by Qwerasd, it notifies you when certain words are said
Have an option to whitelist servers or dms by ID and only words in those places would trigger the notifications
Word to check: HELLO
Case sensitive: enabled
The word "hello" triggers the alert, the word "HELLO" doesn't
Word to check: HELLO
Case sensitive: disabled
Neither "HELLO" nor "hello" trigger the alert
Word to check: Hello
Case sensitive: enabled
The word "hello" triggers the alert, the word "HELLO" doesn't
Heya! I recently upgraded to Windows 11 and was getting notifications fine, but after a recent update BDFDB, the notifications from this plugin aren't working anymore. I'm fairly certain that's when it broke, but it might have been a couple days (I thought my life was finally drama free until I realized!).
The reason I'm posting here and not the BDFDB page is because notifications are working for that plugin - If I click settings on BDFDB and then check for updates, it shows a working toast notification:
However, putting both the BDAPI and the Windows notification code on the MessageReceived handler does nothing and the plugin doesn't work. I'm not familiar enough with how BD does it's internals to diagnose it :c
With "Case Sensitive" turned off, the plugin will only trigger if the proper casing is used. If it's turned on, any CaSiNg will work. It's having the opposite effect. I tried modifying the plugin to swap it but the changes I made to the plugin don't seem to be taking effect? I've never messed with plugins much before so I'm making it an issue instead of a PR to fix it. Sorry!
For example, if I added the word "aida" to the filter - With Case Sensitive turned off, it would only respond to "aida" and not "Aida" or "AIDA" or any casing variation. Turning Case Sensitive on makes it recognize these.
Nice work on the plugin - I was looking for a more updated version of the Word Notification plugin and I'm happy with what I found. ๐
Keeps saying cant be started since the last Discord updates.
var toastString = guild.name + "\n\# " + channel.name + "\n\n" + author.username + ": " + notifWord;
var toastString = "DM\n\n" + author.username + ": " + message.content;
Credits to qwert for making this part โ
// Should we send a bdapi notification?
if (settings["bdapi-notification"]) {
const timeout = settings["bdapi-display-time"];
BdApi.showToast(toastString, {type: "info"});
}
// Should we send a bdfdb notification?
if (settings["bdfdb-notification"]) {
const timeout = settings["bdfdb-display-time"];
const toast = BDFDB.NotificationUtils.toast(toastString, {
timeout: timeout*1000,
barColor: BDFDB.UserUtils.getStatusColor("online", true),
avatar: BDFDB.UserUtils.getAvatar(author.id)
});
toast.addEventListener("click", _ => { this.goToMessage(guildID, channel.id, message.id); });
}
There was a big discord update at the end of September and it broke a lot (all?) plugins. Since then, things have somewhat stabalized, but this plugin still isn't working. It's the last one I need to have my full experience back (I moderate a lot of servers and this helped immensely), and was hoping it could be fixed if possible. Thank you!
Getting [PluginManager] WordNotificationImproved v0.1.0 could not be started. TypeError: BdApi.Webpack.getModule(...).subscribe is not a functionat WordNotificationImproved.start (WordNotificationImproved.plugin.js:122)
The code in question is
BdApi.Webpack.getModule(BdApi.Webpack.Filters.byProps("dispatch")).subscribe("MESSAGE_CREATE", that.messageReceivedOrUpdated);
BdApi.Webpack.getModule(BdApi.Webpack.Filters.byProps("dispatch")).subscribe("MESSAGE_UPDATE", that.messageReceivedOrUpdated);
I tried to use a new version I saw people talking about, but it didn't work (the plugin loaded but it didn't do anything), so I may be way off on this or using it wrong.
const Dispatch = BdApi.Webpack.getModule(BdApi.Webpack.Filters.byProps("dispatch", "subscribe"));
BdApi.Patcher.before("WordNotificationImproved", Dispatch, "dispatch", (_, args, original) => {
const dispatch = args[0];
if (!dispatch) return;
if (dispatch.type === "MESSAGE_CREATE") {
that.messageReceivedOrUpdated
}
if (dispatch.type === "MESSAGE_UPDATE") {
that.messageReceivedOrUpdated
}
});
A while back, the notification that popped up on the side of your screen was able to send you to the message right then and there. It doesn't anymore. Furthermore I would like to request you add a button to the left of the search bar to show all the times the word has been said so you can see it in case you missed it when it popped up.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.