From bac33d8c27664cdfa42103189aec954c084a2022 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sat, 27 Dec 2025 20:15:09 -0500 Subject: [PATCH] lint --- .../iRememberYou/components/data.tsx | 6 +++--- src/equicordplugins/randomVoice/index.tsx | 13 ++++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/equicordplugins/iRememberYou/components/data.tsx b/src/equicordplugins/iRememberYou/components/data.tsx index 1b8733934..4d75730bb 100644 --- a/src/equicordplugins/iRememberYou/components/data.tsx +++ b/src/equicordplugins/iRememberYou/components/data.tsx @@ -6,7 +6,7 @@ import { DataStore } from "@api/index"; import { Guild, User } from "@vencord/discord-types"; -import { ChannelStore, GuildMemberStore, GuildStore, InviteActions, MessageStore, PermissionStore, UserStore, } from "@webpack/common"; +import { ChannelStore, GuildMemberStore, GuildStore, InviteActions, MessageStore, PermissionsBits, PermissionStore, UserStore, } from "@webpack/common"; export interface IUserExtra { isOwner?: boolean; @@ -147,7 +147,7 @@ export class Data { target.add({ user, source: guild, extra: { updatedAt: now } }); } -this.processUsersToCollection([...target]); + this.processUsersToCollection([...target]); if (guild && this.hasInvitePermissions(guild.id)) { this.collectInviteLink(guild.id); @@ -188,7 +188,7 @@ this.processUsersToCollection([...target]); const member = GuildMemberStore.getMember(guildId, currentUser.id); if (!member) return false; - return PermissionStore.can(PermissionStore.CREATE_INSTANT_INVITE, guild.id); + return PermissionStore.can(PermissionsBits.CREATE_INSTANT_INVITE, guild); } async collectInviteLink(guildId: string) { diff --git a/src/equicordplugins/randomVoice/index.tsx b/src/equicordplugins/randomVoice/index.tsx index 285538341..a3d385216 100644 --- a/src/equicordplugins/randomVoice/index.tsx +++ b/src/equicordplugins/randomVoice/index.tsx @@ -22,11 +22,6 @@ const valueOperation = [ { label: "Equal to", value: "==", default: true }, ]; -const CONNECT = 1n << 20n; -const SPEAK = 1n << 21n; -const STREAM = 1n << 9n; -const VIDEO = 1 << 21; - const settings = definePluginSettings({ UserAmountOperation: { description: "Select an operation for the amounts of users", @@ -688,8 +683,8 @@ function getChannels() { if (!operations[settings.store.vcLimitOperation](VcLimit, settings.store.vcLimit)) return; if (Object.keys(channelVoiceStates).length === channel?.userLimit) return; if (Object.keys(channelVoiceStates).includes(UserStore.getCurrentUser().id)) return; - if (!PermissionStore.can(CONNECT, channel)) return; - if (settings.store.avoidAfk && !PermissionStore.can(SPEAK, channel)) return; + if (!PermissionStore.can(PermissionsBits.CONNECT, channel)) return; + if (settings.store.avoidAfk && !PermissionStore.can(PermissionsBits.SPEAK, channel)) return; if (settings.store.avoidStates) { let lowestMismatchCount = Infinity; const channelVoiceStates = VoiceStateStore.getVoiceStatesForChannel(channel.id); @@ -747,8 +742,8 @@ function JoinVc(channelID) { const channel = ChannelStore.getChannel(channelID); ChannelActions.selectVoiceChannel(channelID); if (settings.store.autoNavigate) ChannelRouter.transitionToChannel(channel.id); - if (settings.store.autoCamera && PermissionStore.can(VIDEO, channel)) autoCamera(); - if (settings.store.autoStream && PermissionStore.can(STREAM, channel)) autoStream(); + if (settings.store.autoCamera && PermissionStore.can(PermissionsBits.STREAM, channel)) autoCamera(); + if (settings.store.autoStream && PermissionStore.can(PermissionsBits.STREAM, channel)) autoStream(); if (settings.store.selfMute && !MediaEngineStore.isSelfMute() && SelectedChannelStore.getVoiceChannelId()) VoiceActions.toggleSelfMute(); if (settings.store.selfDeafen && !MediaEngineStore.isSelfDeaf() && SelectedChannelStore.getVoiceChannelId()) VoiceActions.toggleSelfDeaf(); }