mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-25 07:48:32 +00:00
Trycatch
This commit is contained in:
parent
0e6f19ff67
commit
733de54d01
1 changed files with 18 additions and 14 deletions
|
@ -141,6 +141,7 @@ export default definePlugin({
|
||||||
authors: [Devs.Inbestigator],
|
authors: [Devs.Inbestigator],
|
||||||
flux: {
|
flux: {
|
||||||
async MESSAGE_CREATE({ optimistic, type, message, guildId, channelId }: IMessageCreate) {
|
async MESSAGE_CREATE({ optimistic, type, message, guildId, channelId }: IMessageCreate) {
|
||||||
|
try {
|
||||||
if (optimistic || type !== "MESSAGE_CREATE") return;
|
if (optimistic || type !== "MESSAGE_CREATE") return;
|
||||||
if (message.state === "SENDING") return;
|
if (message.state === "SENDING") return;
|
||||||
if (!message.content) return;
|
if (!message.content) return;
|
||||||
|
@ -158,6 +159,9 @@ export default definePlugin({
|
||||||
await showChannelNotification(message);
|
await showChannelNotification(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
settings,
|
settings,
|
||||||
|
|
Loading…
Add table
Reference in a new issue