diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/_api/badges.tsx (renamed from src/plugins/apiBadges.tsx) | 0 | ||||
-rw-r--r-- | src/plugins/_api/commands.ts (renamed from src/plugins/apiCommands.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_api/contextMenu.ts (renamed from src/plugins/apiContextMenu.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_api/memberListDecorators.ts (renamed from src/plugins/apiMemberListDecorators.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_api/messageAccessories.ts (renamed from src/plugins/apiMessageAccessories.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_api/messageDecorations.ts (renamed from src/plugins/apiMessageDecorations.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_api/messageEvents.ts (renamed from src/plugins/apiMessageEvents.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_api/messagePopover.ts (renamed from src/plugins/apiMessagePopover.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_api/notices.ts (renamed from src/plugins/apiNotices.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_api/serverList.ts (renamed from src/plugins/apiServerList.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_api/settingsStore.ts (renamed from src/plugins/apiSettingsStore.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_core/noTrack.ts (renamed from src/plugins/noTrack.ts) | 0 | ||||
-rw-r--r-- | src/plugins/_core/settings.tsx (renamed from src/plugins/settings.tsx) | 0 | ||||
-rw-r--r-- | src/plugins/anonymiseFileNames.ts | 2 | ||||
-rw-r--r-- | src/plugins/customRPC.tsx | 2 | ||||
-rw-r--r-- | src/plugins/fart.ts | 61 | ||||
-rw-r--r-- | src/plugins/ignoreActivities.tsx | 2 | ||||
-rw-r--r-- | src/plugins/lastfm.tsx | 4 | ||||
-rw-r--r-- | src/plugins/muteNewGuild.tsx | 41 | ||||
-rw-r--r-- | src/plugins/reactErrorDecoder.ts (renamed from src/plugins/unminifyErrors.ts) | 0 | ||||
-rw-r--r-- | src/plugins/serverListIndicators.tsx | 2 | ||||
-rw-r--r-- | src/plugins/shikiCodeblocks/types.ts | 6 | ||||
-rw-r--r-- | src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx | 10 | ||||
-rw-r--r-- | src/plugins/showHiddenChannels/index.tsx | 2 | ||||
-rw-r--r-- | src/plugins/supportHelper.tsx | 2 |
25 files changed, 17 insertions, 117 deletions
diff --git a/src/plugins/apiBadges.tsx b/src/plugins/_api/badges.tsx index 5f44d98..5f44d98 100644 --- a/src/plugins/apiBadges.tsx +++ b/src/plugins/_api/badges.tsx diff --git a/src/plugins/apiCommands.ts b/src/plugins/_api/commands.ts index 2197b30..2197b30 100644 --- a/src/plugins/apiCommands.ts +++ b/src/plugins/_api/commands.ts diff --git a/src/plugins/apiContextMenu.ts b/src/plugins/_api/contextMenu.ts index d04e0e6..d04e0e6 100644 --- a/src/plugins/apiContextMenu.ts +++ b/src/plugins/_api/contextMenu.ts diff --git a/src/plugins/apiMemberListDecorators.ts b/src/plugins/_api/memberListDecorators.ts index 6b8cffa..6b8cffa 100644 --- a/src/plugins/apiMemberListDecorators.ts +++ b/src/plugins/_api/memberListDecorators.ts diff --git a/src/plugins/apiMessageAccessories.ts b/src/plugins/_api/messageAccessories.ts index 5bb13cf..5bb13cf 100644 --- a/src/plugins/apiMessageAccessories.ts +++ b/src/plugins/_api/messageAccessories.ts diff --git a/src/plugins/apiMessageDecorations.ts b/src/plugins/_api/messageDecorations.ts index a3b2518..a3b2518 100644 --- a/src/plugins/apiMessageDecorations.ts +++ b/src/plugins/_api/messageDecorations.ts diff --git a/src/plugins/apiMessageEvents.ts b/src/plugins/_api/messageEvents.ts index fa46752..fa46752 100644 --- a/src/plugins/apiMessageEvents.ts +++ b/src/plugins/_api/messageEvents.ts diff --git a/src/plugins/apiMessagePopover.ts b/src/plugins/_api/messagePopover.ts index be4b639..be4b639 100644 --- a/src/plugins/apiMessagePopover.ts +++ b/src/plugins/_api/messagePopover.ts diff --git a/src/plugins/apiNotices.ts b/src/plugins/_api/notices.ts index af7cb15..af7cb15 100644 --- a/src/plugins/apiNotices.ts +++ b/src/plugins/_api/notices.ts diff --git a/src/plugins/apiServerList.ts b/src/plugins/_api/serverList.ts index 6585d38..6585d38 100644 --- a/src/plugins/apiServerList.ts +++ b/src/plugins/_api/serverList.ts diff --git a/src/plugins/apiSettingsStore.ts b/src/plugins/_api/settingsStore.ts index ca1dc65..ca1dc65 100644 --- a/src/plugins/apiSettingsStore.ts +++ b/src/plugins/_api/settingsStore.ts diff --git a/src/plugins/noTrack.ts b/src/plugins/_core/noTrack.ts index 4920ce2..4920ce2 100644 --- a/src/plugins/noTrack.ts +++ b/src/plugins/_core/noTrack.ts diff --git a/src/plugins/settings.tsx b/src/plugins/_core/settings.tsx index 3ea5a43..3ea5a43 100644 --- a/src/plugins/settings.tsx +++ b/src/plugins/_core/settings.tsx diff --git a/src/plugins/anonymiseFileNames.ts b/src/plugins/anonymiseFileNames.ts index 0baf099..37fd18f 100644 --- a/src/plugins/anonymiseFileNames.ts +++ b/src/plugins/anonymiseFileNames.ts @@ -20,7 +20,7 @@ import { Settings } from "@api/Settings"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; -enum Methods { +const enum Methods { Random, Consistent, Timestamp, diff --git a/src/plugins/customRPC.tsx b/src/plugins/customRPC.tsx index 27776ef..8d1be96 100644 --- a/src/plugins/customRPC.tsx +++ b/src/plugins/customRPC.tsx @@ -74,7 +74,7 @@ interface Activity { flags: number; } -enum ActivityType { +const enum ActivityType { PLAYING = 0, LISTENING = 2, WATCHING = 3, diff --git a/src/plugins/fart.ts b/src/plugins/fart.ts deleted file mode 100644 index b92a41d..0000000 --- a/src/plugins/fart.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <https://www.gnu.org/licenses/>. -*/ - -import { ApplicationCommandOptionType } from "@api/Commands"; -import { Settings } from "@api/Settings"; -import { makeRange } from "@components/PluginSettings/components"; -import { Devs } from "@utils/constants"; -import definePlugin, { OptionType } from "@utils/types"; - -export default definePlugin({ - name: "Fart2", - authors: [Devs.Animal], - description: "Enable farting v2, a slash command that allows you to perform or request that someone perform a little toot.", - dependencies: ["CommandsAPI"], - commands: [{ - name: "fart", - description: "A simple command in which you may either request that a user do a little toot for you, or conduct one yourself.", - options: [ - { - type: ApplicationCommandOptionType.USER, - name: "user", - description: "A Discordâ„¢ user of which you would humbly request a toot from.", - required: false - } - ], - - execute(args) { - const fart = new Audio("https://raw.githubusercontent.com/ItzOnlyAnimal/AliuPlugins/main/fart.mp3"); - fart.volume = Settings.plugins.Fart2.volume; - fart.play(); - - return { - content: (args[0]) ? `<@${args[0].value}> fart` : "fart" - }; - }, - }], - options: { - volume: { - description: "how loud you wanna fart (aka volume)", - type: OptionType.SLIDER, - markers: makeRange(0, 1, 0.1), - default: 0.5, - stickToMarkers: false, - } - } -}); diff --git a/src/plugins/ignoreActivities.tsx b/src/plugins/ignoreActivities.tsx index 534b3f7..cf54648 100644 --- a/src/plugins/ignoreActivities.tsx +++ b/src/plugins/ignoreActivities.tsx @@ -24,7 +24,7 @@ import definePlugin from "@utils/types"; import { findByPropsLazy, findStoreLazy } from "@webpack"; import { Tooltip } from "webpack/common"; -enum ActivitiesTypes { +const enum ActivitiesTypes { Game, Embedded } diff --git a/src/plugins/lastfm.tsx b/src/plugins/lastfm.tsx index 19620e0..a55f461 100644 --- a/src/plugins/lastfm.tsx +++ b/src/plugins/lastfm.tsx @@ -63,12 +63,12 @@ interface TrackData { } // only relevant enum values -enum ActivityType { +const enum ActivityType { PLAYING = 0, LISTENING = 2, } -enum ActivityFlag { +const enum ActivityFlag { INSTANCE = 1 << 0, } diff --git a/src/plugins/muteNewGuild.tsx b/src/plugins/muteNewGuild.tsx index e5e618f..c1e4301 100644 --- a/src/plugins/muteNewGuild.tsx +++ b/src/plugins/muteNewGuild.tsx @@ -18,37 +18,8 @@ import { definePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; -import { ModalContent, ModalFooter, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; import definePlugin, { OptionType } from "@utils/types"; -import { findByProps, findStoreLazy } from "@webpack"; -import { Button, Text } from "@webpack/common"; - -const UserGuildSettingsStore = findStoreLazy("UserGuildSettingsStore"); - -function NoDMNotificationsModal({ modalProps }: { modalProps: ModalProps; }) { - return ( - <ModalRoot {...modalProps} size={ModalSize.MEDIUM}> - <ModalContent> - <div style={{ display: "flex", flexDirection: "column", justifyContent: "center", "alignItems": "center", textAlign: "center", height: "100%", padding: "8px 0", gap: "16px" }}> - <Text variant="text-lg/semibold">You seem to have been affected by a bug that caused DM notifications to be muted and break if you used the MuteNewGuild plugin.</Text> - <Text variant="text-lg/semibold">If you haven't received any notifications for private messages, this is why. This issue is now fixed, so they should work again. Please verify, and in case they are still broken, ask for help in the Vencord support channel!</Text> - <Text variant="text-lg/semibold">We're very sorry for any inconvenience caused by this issue :(</Text> - </div> - </ModalContent> - <ModalFooter> - <div style={{ display: "flex", justifyContent: "center", width: "100%" }}> - <Button - onClick={modalProps.onClose} - size={Button.Sizes.MEDIUM} - color={Button.Colors.BRAND} - > - Understood! - </Button> - </div> - </ModalFooter> - </ModalRoot> - ); -} +import { findByProps } from "@webpack"; const settings = definePluginSettings({ guild: { @@ -92,15 +63,5 @@ export default definePlugin({ suppress_roles: settings.store.role } ); - }, - - start() { - const [isMuted, isEveryoneSupressed, isRolesSupressed] = [UserGuildSettingsStore.isMuted(null), UserGuildSettingsStore.isSuppressEveryoneEnabled(null), UserGuildSettingsStore.isSuppressRolesEnabled(null)]; - - if (isMuted || isEveryoneSupressed || isRolesSupressed) { - findByProps("updateGuildNotificationSettings").updateGuildNotificationSettings(null, { muted: false, suppress_everyone: false, suppress_roles: false }); - - openModal(modalProps => <NoDMNotificationsModal modalProps={modalProps} />); - } } }); diff --git a/src/plugins/unminifyErrors.ts b/src/plugins/reactErrorDecoder.ts index 2332d45..2332d45 100644 --- a/src/plugins/unminifyErrors.ts +++ b/src/plugins/reactErrorDecoder.ts diff --git a/src/plugins/serverListIndicators.tsx b/src/plugins/serverListIndicators.tsx index efb967a..96833d8 100644 --- a/src/plugins/serverListIndicators.tsx +++ b/src/plugins/serverListIndicators.tsx @@ -24,7 +24,7 @@ import { useForceUpdater } from "@utils/react"; import definePlugin, { OptionType } from "@utils/types"; import { GuildStore, PresenceStore, RelationshipStore } from "@webpack/common"; -enum IndicatorType { +const enum IndicatorType { SERVER = 1 << 0, FRIEND = 1 << 1, BOTH = SERVER | FRIEND, diff --git a/src/plugins/shikiCodeblocks/types.ts b/src/plugins/shikiCodeblocks/types.ts index e724ea4..fb4a821 100644 --- a/src/plugins/shikiCodeblocks/types.ts +++ b/src/plugins/shikiCodeblocks/types.ts @@ -46,18 +46,18 @@ export type ShikiSpec = { }) => Promise<IThemedToken[][]>; }; -export enum StyleSheets { +export const enum StyleSheets { Main = "MAIN", DevIcons = "DEVICONS", } -export enum HljsSetting { +export const enum HljsSetting { Never = "NEVER", Secondary = "SECONDARY", Primary = "PRIMARY", Always = "ALWAYS", } -export enum DeviconSetting { +export const enum DeviconSetting { Disabled = "DISABLED", Greyscale = "GREYSCALE", Color = "COLOR" diff --git a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx index d01efec..8b41e16 100644 --- a/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx +++ b/src/plugins/showHiddenChannels/components/HiddenChannelLockScreen.tsx @@ -29,12 +29,12 @@ import openRolesAndUsersPermissionsModal, { PermissionType, RoleOrUserPermission import { sortPermissionOverwrites } from "../../permissionsViewer/utils"; import { settings, VIEW_CHANNEL } from ".."; -enum SortOrderTypes { +const enum SortOrderTypes { LATEST_ACTIVITY = 0, CREATION_DATE = 1 } -enum ForumLayoutTypes { +const enum ForumLayoutTypes { DEFAULT = 0, LIST = 1, GRID = 2 @@ -61,7 +61,7 @@ interface ExtendedChannel extends Channel { availableTags?: Array<Tag>; } -enum ChannelTypes { +const enum ChannelTypes { GUILD_TEXT = 0, GUILD_VOICE = 2, GUILD_ANNOUNCEMENT = 5, @@ -69,12 +69,12 @@ enum ChannelTypes { GUILD_FORUM = 15 } -enum VideoQualityModes { +const enum VideoQualityModes { AUTO = 1, FULL = 2 } -enum ChannelFlags { +const enum ChannelFlags { PINNED = 1 << 1, REQUIRE_TAG = 1 << 4 } diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 634b5cd..e32daae 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -34,7 +34,7 @@ const ChannelListClasses = findByPropsLazy("channelName", "subtitle", "modeMuted export const VIEW_CHANNEL = 1n << 10n; const CONNECT = 1n << 20n; -enum ShowMode { +const enum ShowMode { LockIcon, HiddenIconWithMutedStyle } diff --git a/src/plugins/supportHelper.tsx b/src/plugins/supportHelper.tsx index cce7e9a..9bade49 100644 --- a/src/plugins/supportHelper.tsx +++ b/src/plugins/supportHelper.tsx @@ -27,7 +27,7 @@ import { Alerts, Forms, UserStore } from "@webpack/common"; import gitHash from "~git-hash"; import plugins from "~plugins"; -import settings from "./settings"; +import settings from "./_core/settings"; const REMEMBER_DISMISS_KEY = "Vencord-SupportHelper-Dismiss"; |