mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-24 23:38:32 +00:00
Cleaned up the flux function a bit
This commit is contained in:
parent
ba8a5aa537
commit
0f042bc342
1 changed files with 4 additions and 4 deletions
|
@ -117,11 +117,11 @@ export default definePlugin({
|
|||
async MESSAGE_CREATE({ optimistic, type, message, guildId, channelId }: IMessageCreate) {
|
||||
if (optimistic || type !== "MESSAGE_CREATE") return;
|
||||
if (message.state === "SENDING") return;
|
||||
if (message.author.id === UserStore.getCurrentUser().id) return;
|
||||
if (!message.content) return;
|
||||
if (await PresenceStore.getStatus(UserStore.getCurrentUser().id) != 'dnd') return;
|
||||
|
||||
if ((bypasses.guilds.includes(guildId) || bypasses.channels.includes(channelId)) && (message.content.includes(`<@${UserStore.getCurrentUser().id}>`) || message.mentions.some(mention => mention.id === UserStore.getCurrentUser().id))) {
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
if (message.author.id === currentUser.id) return;
|
||||
if (await PresenceStore.getStatus(currentUser.id) != 'dnd') return;
|
||||
if ((bypasses.guilds.includes(guildId) || bypasses.channels.includes(channelId)) && (message.content.includes(`<@${currentUser.id}>`) || message.mentions.some(mention => mention.id === currentUser.id))) {
|
||||
await Notifications.showNotification({
|
||||
title: `${message.author.globalName ?? message.author.username} sent a message in ${ChannelStore.getChannel(channelId).name}`,
|
||||
body: message.content,
|
||||
|
|
Loading…
Add table
Reference in a new issue