This commit is contained in:
Inbestigator 2024-03-06 10:10:56 -08:00 committed by GitHub
parent 0e6f19ff67
commit 733de54d01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -141,6 +141,7 @@ export default definePlugin({
authors: [Devs.Inbestigator],
flux: {
async MESSAGE_CREATE({ optimistic, type, message, guildId, channelId }: IMessageCreate) {
try {
if (optimistic || type !== "MESSAGE_CREATE") return;
if (message.state === "SENDING") return;
if (!message.content) return;
@ -158,6 +159,9 @@ export default definePlugin({
await showChannelNotification(message);
}
}
} catch (error) {
console.error(error);
}
}
},
settings,