Fix PluginHelper Error Logging

This commit is contained in:
thororen 2024-07-12 23:07:05 -04:00 committed by GitHub
parent c8cf4f142d
commit 71c585be16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -174,7 +174,7 @@ export function subscribePluginFluxEvents(p: Plugin, fluxDispatcher: typeof Flux
logger.debug("Subscribing to flux events of plugin", p.name);
for (const [event, handler] of Object.entries(p.flux)) {
const wrappedHandler = p.flux[event] = function () {
if (p.name === "Encryptcord") return;
if (p.name === "Encryptcord" && event === "MESSAGE_CREATE") continue;
try {
const res = handler.apply(p, arguments as any);
return res instanceof Promise