This commit is contained in:
thororen1234 2025-01-22 21:22:25 -05:00
parent acf04bb01d
commit 90d946e7c6
26 changed files with 84 additions and 84 deletions

View file

@ -11,7 +11,7 @@ import {
sendBotMessage,
} from "@api/Commands";
import * as DataStore from "@api/DataStore";
import { addPreSendListener, removePreSendListener, SendListener } from "@api/MessageEvents";
import { addMessagePreSendListener, removeMessagePreSendListener, SendListener } from "@api/MessageEvents";
import { Devs } from "@utils/constants";
import { sleep } from "@utils/misc";
import definePlugin from "@utils/types";
@ -72,8 +72,8 @@ const ChatBarIcon: ChatBarButton = ({ isMainChat }) => {
}
};
addPreSendListener(listener);
return () => void removePreSendListener(listener);
addMessagePreSendListener(listener);
return () => void removeMessagePreSendListener(listener);
}, [enabled]);
if (!isMainChat) return null;