This commit is contained in:
thororen1234 2025-07-10 19:40:07 -04:00
parent 8c6dfd86ed
commit 91d3a67657
No known key found for this signature in database
109 changed files with 225 additions and 133 deletions

View file

@ -48,7 +48,7 @@
"fflate": "^0.8.2", "fflate": "^0.8.2",
"gifenc": "github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3", "gifenc": "github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3",
"jsqr": "1.4.0", "jsqr": "1.4.0",
"idb": "8.0.0", "idb": "8.0.3",
"monaco-editor": "^0.52.2", "monaco-editor": "^0.52.2",
"nanoid": "^5.1.5", "nanoid": "^5.1.5",
"socket.io": "^4.8.1", "socket.io": "^4.8.1",

View file

@ -1,3 +1,4 @@
import { Moment } from "moment";
import type { ComponentClass, ComponentPropsWithRef, ComponentType, CSSProperties, FunctionComponent, HtmlHTMLAttributes, HTMLProps, JSX, KeyboardEvent, MouseEvent, PointerEvent, PropsWithChildren, ReactNode, Ref, RefObject } from "react"; import type { ComponentClass, ComponentPropsWithRef, ComponentType, CSSProperties, FunctionComponent, HtmlHTMLAttributes, HTMLProps, JSX, KeyboardEvent, MouseEvent, PointerEvent, PropsWithChildren, ReactNode, Ref, RefObject } from "react";
// copy(find(m => Array.isArray(m) && m.includes("heading-sm/normal")).map(JSON.stringify).join("|")) // copy(find(m => Array.isArray(m) && m.includes("heading-sm/normal")).map(JSON.stringify).join("|"))

View file

@ -5,5 +5,7 @@ export * from "./flux";
export * from "./fluxEvents"; export * from "./fluxEvents";
export * from "./menu"; export * from "./menu";
export * from "./stores"; export * from "./stores";
export * from "./passiveupdatestate";
export * from "./utils"; export * from "./utils";
export * from "./voicestate";
export * as Webpack from "../webpack"; export * as Webpack from "../webpack";

View file

@ -4,18 +4,35 @@ export class RelationshipStore extends FluxStore {
getFriendIDs(): string[]; getFriendIDs(): string[];
getIgnoredIDs(): string[]; getIgnoredIDs(): string[];
getBlockedIDs(): string[]; getBlockedIDs(): string[];
getBlockedOrIgnoredIDs(): string[];
getPendingCount(): number; getPendingCount(): number;
getRelationshipCount(): number; getRelationshipCount(): number;
/** Related to friend nicknames. */ /** Related to friend nicknames. */
getNickname(userId: string): string; getNickname(userId: string): string;
/** @returns Enum value from constants.RelationshipTypes */ /** @returns Enum value from constants.RelationshipTypes */
getRelationshipType(userId: string): number; getRelationshipType(userId: string): number;
isFriend(userId: string): boolean; isBlockedOrIgnored(userId: string): boolean;
isBlockedOrIgnoredForMessage(userId: string): boolean;
isBlocked(userId: string): boolean; isBlocked(userId: string): boolean;
isBlockedForMessage(userId: string): boolean;
isFriend(userId: string): boolean;
isIgnored(userId: string): boolean; isIgnored(userId: string): boolean;
isIgnoredForMessage(userId: string): boolean;
isUnfilteredPendingIncoming(userId: string): boolean;
isSpam(userId): boolean;
getSince(userId: string): string; getSince(userId: string): string;
getSinces(): Record<number, string>;
getFriendCount(): number;
getPendingCount(): number;
getPendingIgnoredCount(): number;
getSpamCount(): number;
getRelationshipCount(): number;
getOutgoingCount(): number;
getMutableRelationships(): Map<string, number>; getMutableRelationships(): Map<string, number>;
getVersion(): number;
} }

View file

@ -0,0 +1,60 @@
import { FluxStore } from "..";
export interface Sticker {
available: boolean;
description: string;
id: string;
name: string;
tags: string;
type: number;
t: "Sticker";
format_type: number;
image: string;
title: string;
stickerPackId: StickerPackMeta["id"];
guild_id: string;
filename?: string;
isAnimated?: boolean;
}
export interface StickerPackMeta {
id: string;
title: string;
author?: {
name: string;
url?: string;
};
logo: Sticker;
dynamic?: DynamicStickerPackMeta["dynamic"];
}
export interface DynamicStickerPackMeta extends StickerPackMeta {
dynamic: {
version?: string;
refreshUrl: string;
authHeaders?: Record<string, string>;
};
}
export interface StickerPack extends StickerPackMeta {
stickers: Sticker[];
}
export interface StickerCategoryType {
id: string;
name: string;
iconUrl?: string;
}
export class StickerStore extends FluxStore {
getStickerById(id: string): Sticker | undefined;
getStickerPack(id: string): StickerPack | undefined;
getPremiumPacks(): StickerPack[];
isPremiumPack(id: string): boolean;
getRawStickersByGuild(): Map<string, Sticker[]>;
getAllStickersIterator(): IterableIterator<Sticker>;
getAllGuildStickers(): Map<string, Sticker[]>;
getStickersByGuildId(id: string): Sticker[] | undefined;
}

View file

@ -13,6 +13,7 @@ export * from "./SelectedGuildStore";
export * from "./ThemeStore"; export * from "./ThemeStore";
export * from "./UserStore"; export * from "./UserStore";
export * from "./WindowStore"; export * from "./WindowStore";
export * from "./StickerStore";
/** /**
* React hook that returns stateful data for one or more stores * React hook that returns stateful data for one or more stores

10
pnpm-lock.yaml generated
View file

@ -50,8 +50,8 @@ importers:
specifier: github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3 specifier: github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3
version: https://codeload.github.com/mattdesl/gifenc/tar.gz/64842fca317b112a8590f8fef2bf3825da8f6fe3 version: https://codeload.github.com/mattdesl/gifenc/tar.gz/64842fca317b112a8590f8fef2bf3825da8f6fe3
idb: idb:
specifier: 8.0.0 specifier: 8.0.3
version: 8.0.0 version: 8.0.3
jsqr: jsqr:
specifier: 1.4.0 specifier: 1.4.0
version: 1.4.0 version: 1.4.0
@ -1519,8 +1519,8 @@ packages:
humanize-ms@1.2.1: humanize-ms@1.2.1:
resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
idb@8.0.0: idb@8.0.3:
resolution: {integrity: sha512-l//qvlAKGmQO31Qn7xdzagVPPaHTxXx199MhrAFuVBTPqydcPYBWjkrbv4Y0ktB+GmWOiwHl237UUOrLmQxLvw==} resolution: {integrity: sha512-LtwtVyVYO5BqRvcsKuB2iUMnHwPVByPCXFXOpuU96IZPPoPN6xjOGxZQ74pgSVVLQWtUOYgyeL4GE98BY5D3wg==}
ieee754@1.2.1: ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
@ -4015,7 +4015,7 @@ snapshots:
dependencies: dependencies:
ms: 2.1.2 ms: 2.1.2
idb@8.0.0: {} idb@8.0.3: {}
ieee754@1.2.1: {} ieee754@1.2.1: {}

View file

@ -5,7 +5,8 @@
*/ */
import { identity } from "@utils/misc"; import { identity } from "@utils/misc";
import { ComponentTypes, Forms, Select, useMemo } from "@webpack/common"; import { SelectOption } from "@vencord/discord-types";
import { Forms, Select, useMemo } from "@webpack/common";
interface Props { interface Props {
label: string; label: string;
@ -31,7 +32,7 @@ export function SettingSelectComponent({ label, name, options, default: def, the
value: option.value, value: option.value,
default: def === option.name, default: def === option.name,
label: option.label label: option.label
} satisfies ComponentTypes.SelectOption)), [options, def]); } satisfies SelectOption)), [options, def]);
return ( return (
<Forms.FormSection> <Forms.FormSection>

View file

@ -8,8 +8,8 @@ import { definePluginSettings } from "@api/Settings";
import ErrorBoundary from "@components/ErrorBoundary"; import ErrorBoundary from "@components/ErrorBoundary";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { PassiveUpdateState, VoiceState } from "@vencord/discord-types";
import { FluxDispatcher, GuildStore, UserStore } from "@webpack/common"; import { FluxDispatcher, GuildStore, UserStore } from "@webpack/common";
import { PassiveUpdateState, VoiceState } from "@webpack/types";
import { Timer } from "./Timer"; import { Timer } from "./Timer";

View file

@ -7,7 +7,7 @@
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import { openUserProfile } from "@utils/discord"; import { openUserProfile } from "@utils/discord";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { User } from "discord-types/general"; import { User } from "@vencord/discord-types";
export default definePlugin({ export default definePlugin({
name: "AlwaysExpandProfile", name: "AlwaysExpandProfile",

View file

@ -9,8 +9,8 @@ import { definePluginSettings } from "@api/Settings";
import { disableStyle, enableStyle } from "@api/Styles"; import { disableStyle, enableStyle } from "@api/Styles";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType, Plugin } from "@utils/types"; import definePlugin, { OptionType, Plugin } from "@utils/types";
import { User } from "@vencord/discord-types";
import { findStoreLazy } from "@webpack"; import { findStoreLazy } from "@webpack";
import { User } from "discord-types/general";
import style from "./style.css?managed"; import style from "./style.css?managed";

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { User } from "discord-types/general"; import { User } from "@vencord/discord-types";
import { CSSProperties, ImgHTMLAttributes, JSX } from "react"; import { CSSProperties, ImgHTMLAttributes, JSX } from "react";
export interface Timestamp { export interface Timestamp {

View file

@ -7,7 +7,7 @@
import { definePluginSettings, Settings } from "@api/Settings"; import { definePluginSettings, Settings } from "@api/Settings";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { MessageJSON } from "discord-types/general"; import { MessageJSON } from "@vencord/discord-types";
let blockedKeywords: Array<RegExp>; let blockedKeywords: Array<RegExp>;

View file

@ -11,8 +11,8 @@ import { Devs } from "@utils/constants";
import { getCurrentChannel } from "@utils/discord"; import { getCurrentChannel } from "@utils/discord";
import { Logger } from "@utils/Logger"; import { Logger } from "@utils/Logger";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import type { Message } from "@vencord/discord-types";
import { ChannelActionCreators, ChannelStore, Menu, MessageStore, NavigationRouter, PresenceStore, UserStore, WindowStore } from "@webpack/common"; import { ChannelActionCreators, ChannelStore, Menu, MessageStore, NavigationRouter, PresenceStore, UserStore, WindowStore } from "@webpack/common";
import type { Message } from "discord-types/general";
import { JSX } from "react"; import { JSX } from "react";
interface IMessageCreate { interface IMessageCreate {

View file

@ -9,8 +9,8 @@ import "./style.css";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import { getCurrentGuild } from "@utils/discord"; import { getCurrentGuild } from "@utils/discord";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Channel, Guild } from "@vencord/discord-types";
import { ChannelStore, SelectedGuildStore } from "@webpack/common"; import { ChannelStore, SelectedGuildStore } from "@webpack/common";
import { Channel, Guild } from "discord-types/general";
import { isEnabled, returnChannelBadge, settings } from "./settings"; import { isEnabled, returnChannelBadge, settings } from "./settings";

View file

@ -7,9 +7,9 @@
import { classNameFactory } from "@api/Styles"; import { classNameFactory } from "@api/Styles";
import { getGuildAcronym, getIntlMessage, getUniqueUsername } from "@utils/discord"; import { getGuildAcronym, getIntlMessage, getUniqueUsername } from "@utils/discord";
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import { Channel, Guild, User } from "@vencord/discord-types";
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
import { Avatar, ChannelStore, ContextMenuApi, GuildStore, PresenceStore, ReadStateStore, Text, TypingStore, useDrag, useDrop, useRef, UserStore, useStateFromStores } from "@webpack/common"; import { Avatar, ChannelStore, ContextMenuApi, GuildStore, PresenceStore, ReadStateStore, Text, TypingStore, useDrag, useDrop, useRef, UserStore, useStateFromStores } from "@webpack/common";
import { Channel, Guild, User } from "discord-types/general";
import { ChannelTabsProps, CircleQuestionIcon, closeTab, isTabSelected, moveDraggedTabs, moveToTab, openedTabs, settings } from "../util"; import { ChannelTabsProps, CircleQuestionIcon, closeTab, isTabSelected, moveDraggedTabs, moveToTab, openedTabs, settings } from "../util";
import { TabContextMenu } from "./ContextMenus"; import { TabContextMenu } from "./ContextMenus";

View file

@ -10,8 +10,8 @@ import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/Co
import ErrorBoundary from "@components/ErrorBoundary"; import ErrorBoundary from "@components/ErrorBoundary";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Channel, Message } from "@vencord/discord-types";
import { ChannelStore, Menu } from "@webpack/common"; import { ChannelStore, Menu } from "@webpack/common";
import { Channel, Message } from "discord-types/general";
import { JSX } from "react"; import { JSX } from "react";
import ChannelsTabsContainer from "./components/ChannelTabsContainer"; import ChannelsTabsContainer from "./components/ChannelTabsContainer";

View file

@ -6,7 +6,7 @@
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Channel } from "discord-types/general"; import { Channel } from "@vencord/discord-types";
export default definePlugin({ export default definePlugin({
name: "CleanChannelName", name: "CleanChannelName",

View file

@ -7,8 +7,8 @@
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { GuildMember } from "@vencord/discord-types";
import { ChannelStore, GuildMemberStore, GuildRoleStore, RelationshipStore, Text, UserStore } from "@webpack/common"; import { ChannelStore, GuildMemberStore, GuildRoleStore, RelationshipStore, Text, UserStore } from "@webpack/common";
import { GuildMember } from "discord-types/general";
const settings = definePluginSettings( const settings = definePluginSettings(
{ {

View file

@ -9,9 +9,9 @@ import { Link } from "@components/Link";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { ModalAPI } from "@utils/modal"; import { ModalAPI } from "@utils/modal";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { SelectOption } from "@vencord/discord-types";
import { findStoreLazy } from "@webpack"; import { findStoreLazy } from "@webpack";
import { PresenceStore, UserStore } from "@webpack/common"; import { PresenceStore, UserStore } from "@webpack/common";
import { SelectOption } from "@webpack/types";
interface Activity { interface Activity {
name: string; name: string;

View file

@ -8,8 +8,8 @@ import { NavContextMenuPatchCallback } from "@api/ContextMenu";
import { copyToClipboard } from "@utils/clipboard"; import { copyToClipboard } from "@utils/clipboard";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import type { Channel, User } from "@vencord/discord-types";
import { Menu } from "@webpack/common"; import { Menu } from "@webpack/common";
import type { Channel, User } from "discord-types/general";
const MentionIcon = () => ( const MentionIcon = () => (
<svg <svg

View file

@ -12,9 +12,9 @@ import { definePluginSettings, Settings } from "@api/Settings";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import { openModal } from "@utils/modal"; import { openModal } from "@utils/modal";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { User } from "@vencord/discord-types";
import { extractAndLoadChunksLazy } from "@webpack"; import { extractAndLoadChunksLazy } from "@webpack";
import { Menu } from "@webpack/common"; import { Menu } from "@webpack/common";
import { User } from "discord-types/general";
import { SetColorModal } from "./SetColorModal"; import { SetColorModal } from "./SetColorModal";

View file

@ -15,6 +15,7 @@ import { addMessagePreSendListener, MessageSendListener, removeMessagePreSendLis
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import { sleep } from "@utils/misc"; import { sleep } from "@utils/misc";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Message } from "@vencord/discord-types";
import { import {
ChannelActionCreators, ChannelActionCreators,
FluxDispatcher, MessageActions, RestAPI, FluxDispatcher, MessageActions, RestAPI,
@ -22,7 +23,6 @@ import {
useEffect, UserStore, useEffect, UserStore,
UserUtils, useState, UserUtils, useState,
} from "@webpack/common"; } from "@webpack/common";
import { Message } from "discord-types/general";
const CloudUpload = findLazy(m => m.prototype?.trackUploadFinished); const CloudUpload = findLazy(m => m.prototype?.trackUploadFinished);
import { getCurrentChannel } from "@utils/discord"; import { getCurrentChannel } from "@utils/discord";

View file

@ -4,10 +4,9 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { Channel, Guild, Message, RC, User } from "@vencord/discord-types";
import { findByCodeLazy, findLazy } from "@webpack"; import { findByCodeLazy, findLazy } from "@webpack";
import { GuildStore } from "@webpack/common"; import { GuildStore } from "@webpack/common";
import { RC } from "@webpack/types";
import { Channel, Guild, Message, User } from "discord-types/general";
import { settings } from "./settings"; import { settings } from "./settings";
import type { ITag } from "./types"; import type { ITag } from "./types";

View file

@ -11,8 +11,8 @@ import { classNameFactory } from "@api/Styles";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import { getCurrentChannel, getIntlMessage } from "@utils/discord"; import { getCurrentChannel, getIntlMessage } from "@utils/discord";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Channel, Message, User } from "@vencord/discord-types";
import { ChannelStore, GuildStore, PermissionsBits, SelectedChannelStore, UserStore } from "@webpack/common"; import { ChannelStore, GuildStore, PermissionsBits, SelectedChannelStore, UserStore } from "@webpack/common";
import { Channel, Message, User } from "discord-types/general";
import { computePermissions, Tag, tags } from "./consts"; import { computePermissions, Tag, tags } from "./consts";
import { settings } from "./settings"; import { settings } from "./settings";

View file

@ -4,8 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import type { Permissions } from "@webpack/types"; import type { Channel, Message, Permissions, User } from "@vencord/discord-types";
import type { Channel, Message, User } from "discord-types/general";
import { tags } from "./consts"; import { tags } from "./consts";

View file

@ -10,8 +10,8 @@ import { EquicordDevs } from "@utils/constants";
import { showItemInFolder } from "@utils/native"; import { showItemInFolder } from "@utils/native";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { saveFile } from "@utils/web"; import { saveFile } from "@utils/web";
import { Message } from "@vencord/discord-types";
import { Menu } from "@webpack/common"; import { Menu } from "@webpack/common";
import { Message } from "discord-types/general";
const settings = definePluginSettings({ const settings = definePluginSettings({
openFileAfterExport: { openFileAfterExport: {

View file

@ -5,8 +5,8 @@
*/ */
import { copyWithToast } from "@utils/misc"; import { copyWithToast } from "@utils/misc";
import type { Guild } from "@vencord/discord-types";
import { Button, showToast, Switch, UserStore, useState, useToken } from "@webpack/common"; import { Button, showToast, Switch, UserStore, useState, useToken } from "@webpack/common";
import type { Guild } from "discord-types/general";
import { buildFPTE } from "../lib/fpte"; import { buildFPTE } from "../lib/fpte";
import { useAccentColor, usePrimaryColor, useProfileEffect, useShowPreview } from "../lib/profilePreview"; import { useAccentColor, usePrimaryColor, useProfileEffect, useShowPreview } from "../lib/profilePreview";
@ -25,7 +25,7 @@ export function Builder({ guild }: BuilderProps) {
const avatarColors = useAvatarColors( const avatarColors = useAvatarColors(
UserStore.getCurrentUser()?.getAvatarURL(guild?.id, 80), UserStore.getCurrentUser()?.getAvatarURL(guild?.id, 80),
useToken(tokens.unsafe_rawColors.PRIMARY_530).hex(), useToken(tokens.unsafe_rawColors.PRIMARY_530 as any).hex(),
false false
); );

View file

@ -5,9 +5,8 @@
*/ */
import { type ModalProps, openModal } from "@utils/modal"; import { type ModalProps, openModal } from "@utils/modal";
import type { Guild, useToken } from "@vencord/discord-types";
import { extractAndLoadChunksLazy, findByCodeLazy, findByPropsLazy, findComponentByCodeLazy } from "@webpack"; import { extractAndLoadChunksLazy, findByCodeLazy, findByPropsLazy, findComponentByCodeLazy } from "@webpack";
import type { useToken } from "@webpack/types";
import type { Guild } from "discord-types/general";
import type { ComponentType, FunctionComponent, PropsWithChildren, ReactNode } from "react"; import type { ComponentType, FunctionComponent, PropsWithChildren, ReactNode } from "react";
import type { ProfileEffectConfig } from "../lib/profileEffects"; import type { ProfileEffectConfig } from "../lib/profileEffects";

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import type { FluxStore } from "@vencord/discord-types";
import { findByCodeLazy, findStoreLazy } from "@webpack"; import { findByCodeLazy, findStoreLazy } from "@webpack";
import type { FluxStore } from "@webpack/types";
import type { SnakeCasedProperties } from "type-fest"; import type { SnakeCasedProperties } from "type-fest";
export const ProfileEffectStore: FluxStore & { export const ProfileEffectStore: FluxStore & {

View file

@ -6,9 +6,9 @@
import ErrorBoundary from "@components/ErrorBoundary"; import ErrorBoundary from "@components/ErrorBoundary";
import { ModalCloseButton } from "@utils/modal"; import { ModalCloseButton } from "@utils/modal";
import { Message } from "@vencord/discord-types";
import { findByPropsLazy } from "@webpack"; import { findByPropsLazy } from "@webpack";
import { Paginator, React, useRef, useState } from "@webpack/common"; import { Paginator, React, useRef, useState } from "@webpack/common";
import { Message } from "discord-types/general";
import { MutableRefObject } from "react"; import { MutableRefObject } from "react";
import { jumper } from "./index"; import { jumper } from "./index";

View file

@ -20,9 +20,9 @@ import { addMessagePopoverButton, removeMessagePopoverButton } from "@api/Messag
import { disableStyle, enableStyle } from "@api/Styles"; import { disableStyle, enableStyle } from "@api/Styles";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Message } from "@vencord/discord-types";
import { findByPropsLazy } from "@webpack"; import { findByPropsLazy } from "@webpack";
import { ChannelStore, createRoot, MessageStore, Toasts } from "@webpack/common"; import { ChannelStore, createRoot, MessageStore, Toasts } from "@webpack/common";
import Message from "discord-types/general/Message";
import { Root } from "react-dom/client"; import { Root } from "react-dom/client";
import ReplyNavigator from "./ReplyNavigator"; import ReplyNavigator from "./ReplyNavigator";

View file

@ -10,10 +10,9 @@ import { NavContextMenuPatchCallback } from "@api/ContextMenu";
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Channel, User, VoiceState } from "@vencord/discord-types";
import { findByPropsLazy, findStoreLazy } from "@webpack"; import { findByPropsLazy, findStoreLazy } from "@webpack";
import { Forms, Menu, React, VoiceStateStore } from "@webpack/common"; import { Forms, Menu, React, VoiceStateStore } from "@webpack/common";
import { VoiceState } from "@webpack/types";
import { Channel, User } from "discord-types/general";
type TFollowedUserInfo = { type TFollowedUserInfo = {
lastChannelId: string; lastChannelId: string;

View file

@ -8,7 +8,7 @@ import { definePluginSettings } from "@api/Settings";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import { sendMessage } from "@utils/discord"; import { sendMessage } from "@utils/discord";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Message } from "discord-types/general"; import { Message } from "@vencord/discord-types";
// Taken From Signature :) // Taken From Signature :)
const settings = definePluginSettings({ const settings = definePluginSettings({
@ -31,8 +31,8 @@ export default definePlugin({
{ {
find: "#{intl::MESSAGE_FORWARDING_NSFW_NOT_ALLOWED}", find: "#{intl::MESSAGE_FORWARDING_NSFW_NOT_ALLOWED}",
replacement: { replacement: {
match: /if\((\i)\.isNSFW\(\)&&.{0,25}\)\)\)/, match: /if\(.*?\)(return.{0,25}#{intl::MESSAGE_FORWARDING_NSFW_NOT_ALLOWED})/,
replace: "if(false)", replace: "if(false)$1",
} }
}, },
{ {

View file

@ -20,9 +20,9 @@ import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption,
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import { Logger } from "@utils/Logger"; import { Logger } from "@utils/Logger";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { User } from "@vencord/discord-types";
import { findStore } from "@webpack"; import { findStore } from "@webpack";
import { DraftType, UploadHandler, UserStore } from "@webpack/common"; import { DraftType, UploadHandler, UserStore } from "@webpack/common";
import { User } from "discord-types/general";
const logger = new Logger("FriendCloud"); const logger = new Logger("FriendCloud");

View file

@ -5,7 +5,7 @@
*/ */
import { MessageObject } from "@api/MessageEvents"; import { MessageObject } from "@api/MessageEvents";
import { Message } from "discord-types/general"; import { Message } from "@vencord/discord-types";
import Ollama from "./providers/Ollama"; import Ollama from "./providers/Ollama";
import OpenAI from "./providers/OpenAI"; import OpenAI from "./providers/OpenAI";

View file

@ -5,7 +5,7 @@
*/ */
import { MessageObject } from "@api/MessageEvents"; import { MessageObject } from "@api/MessageEvents";
import { Message } from "discord-types/general"; import { Message } from "@vencord/discord-types";
import { instructions } from "../instructions"; import { instructions } from "../instructions";
import { FurudoSettings } from "../types"; import { FurudoSettings } from "../types";

View file

@ -5,7 +5,7 @@
*/ */
import { MessageObject } from "@api/MessageEvents"; import { MessageObject } from "@api/MessageEvents";
import { Message } from "discord-types/general"; import { Message } from "@vencord/discord-types";
import { instructions } from "../instructions"; import { instructions } from "../instructions";
import { FurudoSettings } from "../types"; import { FurudoSettings } from "../types";

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { Message } from "@vencord/discord-types";
import { MessageStore, SnowflakeUtils } from "@webpack/common"; import { MessageStore, SnowflakeUtils } from "@webpack/common";
import { Message } from "discord-types/general";
import { settings } from "../index"; import { settings } from "../index";
import { Gif } from "../types"; import { Gif } from "../types";

View file

@ -11,9 +11,9 @@ import ErrorBoundary from "@components/ErrorBoundary";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import { Logger } from "@utils/Logger"; import { Logger } from "@utils/Logger";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { User } from "@vencord/discord-types";
import { findByCodeLazy } from "@webpack"; import { findByCodeLazy } from "@webpack";
import { React, Text } from "@webpack/common"; import { React, Text } from "@webpack/common";
import { User } from "discord-types/general";
import { GitHubReposComponent } from "./components/GitHubReposComponent"; import { GitHubReposComponent } from "./components/GitHubReposComponent";

View file

@ -22,8 +22,8 @@ import ErrorBoundary from "@components/ErrorBoundary";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import { ModalContent, ModalRoot, openModal } from "@utils/modal"; import { ModalContent, ModalRoot, openModal } from "@utils/modal";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { User } from "@vencord/discord-types";
import { Forms, React, Tooltip, UserStore } from "@webpack/common"; import { Forms, React, Tooltip, UserStore } from "@webpack/common";
import { User } from "discord-types/general";
import { JSX } from "react"; import { JSX } from "react";
type CustomBadge = string | { type CustomBadge = string | {

View file

@ -8,8 +8,8 @@ import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/Co
import { migratePluginSettings } from "@api/Settings"; import { migratePluginSettings } from "@api/Settings";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import type { Guild } from "@vencord/discord-types";
import { EmojiStore, Menu, StickerStore } from "@webpack/common"; import { EmojiStore, Menu, StickerStore } from "@webpack/common";
import type { Guild } from "discord-types/general";
import { zipSync } from "fflate"; import { zipSync } from "fflate";
const Patch: NavContextMenuPatchCallback = (children, { guild }: { guild: Guild; }) => { const Patch: NavContextMenuPatchCallback = (children, { guild }: { guild: Guild; }) => {

View file

@ -5,9 +5,9 @@
*/ */
import * as DataStore from "@api/DataStore"; import * as DataStore from "@api/DataStore";
import { Guild } from "@vencord/discord-types";
import { findStoreLazy, proxyLazyWebpack } from "@webpack"; import { findStoreLazy, proxyLazyWebpack } from "@webpack";
import { Flux, FluxDispatcher, GuildStore } from "@webpack/common"; import { Flux, FluxDispatcher, GuildStore } from "@webpack/common";
import { Guild } from "discord-types/general";
export const HiddenServersStore = proxyLazyWebpack(() => { export const HiddenServersStore = proxyLazyWebpack(() => {

View file

@ -17,9 +17,9 @@ import {
ModalSize, ModalSize,
openModal, openModal,
} from "@utils/modal"; } from "@utils/modal";
import { Guild } from "@vencord/discord-types";
import { findByPropsLazy } from "@webpack"; import { findByPropsLazy } from "@webpack";
import { Button, Forms, IconUtils, Text, useStateFromStores } from "@webpack/common"; import { Button, Forms, IconUtils, Text, useStateFromStores } from "@webpack/common";
import { Guild } from "discord-types/general";
import { HiddenServersStore } from "../HiddenServersStore"; import { HiddenServersStore } from "../HiddenServersStore";

View file

@ -17,8 +17,8 @@ import {
} from "@api/ServerList"; } from "@api/ServerList";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Guild } from "@vencord/discord-types";
import { Menu, React, useStateFromStores } from "@webpack/common"; import { Menu, React, useStateFromStores } from "@webpack/common";
import { Guild } from "discord-types/general";
import hiddenServersButton from "./components/HiddenServersButton"; import hiddenServersButton from "./components/HiddenServersButton";
import { HiddenServersStore } from "./HiddenServersStore"; import { HiddenServersStore } from "./HiddenServersStore";

View file

@ -5,8 +5,8 @@
*/ */
import { makeDummyUser } from "@components/PluginSettings/PluginModal"; import { makeDummyUser } from "@components/PluginSettings/PluginModal";
import { Channel, Message } from "@vencord/discord-types";
import { ChannelStore, lodash, Toasts, UserStore } from "@webpack/common"; import { ChannelStore, lodash, Toasts, UserStore } from "@webpack/common";
import { Channel, Message } from "discord-types/general";
import { Discord, HolyNotes } from "./types"; import { Discord, HolyNotes } from "./types";
import { deleteCacheFromDataStore, DeleteEntireStore, saveCacheToDataStore } from "./utils"; import { deleteCacheFromDataStore, DeleteEntireStore, saveCacheToDataStore } from "./utils";

View file

@ -26,9 +26,9 @@ import { EquicordDevs } from "@utils/constants";
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import { openModal } from "@utils/modal"; import { openModal } from "@utils/modal";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Message } from "@vencord/discord-types";
import { findByCodeLazy, findByProps, findComponentByCodeLazy } from "@webpack"; import { findByCodeLazy, findByProps, findComponentByCodeLazy } from "@webpack";
import { ChannelStore, Menu } from "@webpack/common"; import { ChannelStore, Menu } from "@webpack/common";
import { Message } from "discord-types/general";
import { Popover as NoteButtonPopover, Popover } from "./components/icons/NoteButton"; import { Popover as NoteButtonPopover, Popover } from "./components/icons/NoteButton";
import { NoteModal } from "./components/modals/Notebook"; import { NoteModal } from "./components/modals/Notebook";

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { Embed, MessageAttachment, MessageReaction } from "discord-types/general"; import { Embed, MessageAttachment, MessageReaction } from "@vencord/discord-types";
export declare namespace Discord { export declare namespace Discord {
export interface Sticker { export interface Sticker {

View file

@ -7,8 +7,8 @@
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Message } from "@vencord/discord-types";
import { RelationshipStore, SelectedChannelStore } from "@webpack/common"; import { RelationshipStore, SelectedChannelStore } from "@webpack/common";
import { Message } from "discord-types/general";
interface IMessageCreate { interface IMessageCreate {
type: "MESSAGE_CREATE"; type: "MESSAGE_CREATE";

View file

@ -13,8 +13,8 @@ import { EquicordDevs } from "@utils/constants";
import { openUserProfile } from "@utils/discord"; import { openUserProfile } from "@utils/discord";
import * as Modal from "@utils/modal"; import * as Modal from "@utils/modal";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Guild, User } from "@vencord/discord-types";
import { Avatar, Button, ChannelStore, Clickable, Flex, GuildMemberStore, GuildStore, MessageStore, React, Text, TextArea, TextInput, Tooltip, UserStore, } from "@webpack/common"; import { Avatar, Button, ChannelStore, Clickable, Flex, GuildMemberStore, GuildStore, MessageStore, React, Text, TextArea, TextInput, Tooltip, UserStore, } from "@webpack/common";
import { Guild, User } from "discord-types/general";
interface IUserExtra { interface IUserExtra {
isOwner?: boolean; isOwner?: boolean;

View file

@ -17,8 +17,8 @@ import {
ModalSize, ModalSize,
openModal openModal
} from "@utils/modal"; } from "@utils/modal";
import * as t from "@vencord/discord-types";
import { Button, FluxDispatcher, TooltipContainer, useCallback, useEffect, useState } from "@webpack/common"; import { Button, FluxDispatcher, TooltipContainer, useCallback, useEffect, useState } from "@webpack/common";
import * as t from "@webpack/types";
import { IconsFinds } from "./names"; import { IconsFinds } from "./names";
import { openRawModal } from "./rawModal"; import { openRawModal } from "./rawModal";

View file

@ -21,8 +21,8 @@ import "./IconsTab.css";
import { SettingsTab, wrapTab } from "@components/VencordSettings/shared"; import { SettingsTab, wrapTab } from "@components/VencordSettings/shared";
import { Margins } from "@utils/margins"; import { Margins } from "@utils/margins";
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import * as t from "@vencord/discord-types";
import { Button, Clickable, Forms, React, TextInput, TooltipContainer } from "@webpack/common"; import { Button, Clickable, Forms, React, TextInput, TooltipContainer } from "@webpack/common";
import * as t from "@webpack/types";
import { openIconModal } from "./IconModal"; import { openIconModal } from "./IconModal";
import { getNameByIcon } from "./names"; import { getNameByIcon } from "./names";

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import * as t from "@webpack/types"; import * as t from "@vencord/discord-types";
// name: pattern // name: pattern
export const IconsFinds = { export const IconsFinds = {

View file

@ -18,8 +18,8 @@ import {
ModalSize, ModalSize,
openModal openModal
} from "@utils/modal"; } from "@utils/modal";
import * as t from "@vencord/discord-types";
import { Button, Toasts } from "@webpack/common"; import { Button, Toasts } from "@webpack/common";
import * as t from "@webpack/types";
import { ModalHeaderTitle } from "./subComponents"; import { ModalHeaderTitle } from "./subComponents";

View file

@ -14,8 +14,8 @@ import {
ModalSize, ModalSize,
openModal openModal
} from "@utils/modal"; } from "@utils/modal";
import * as t from "@vencord/discord-types";
import { Button, Forms, Select, TextInput, useCallback, useEffect, useState } from "@webpack/common"; import { Button, Forms, Select, TextInput, useCallback, useEffect, useState } from "@webpack/common";
import * as t from "@webpack/types";
import { ModalHeaderTitle } from "./subComponents"; import { ModalHeaderTitle } from "./subComponents";
import { convertComponentToHtml, cssColors, iconSizesInPx, saveIcon } from "./utils"; import { convertComponentToHtml, cssColors, iconSizesInPx, saveIcon } from "./utils";

View file

@ -5,9 +5,9 @@
*/ */
import { saveFile } from "@utils/web"; import { saveFile } from "@utils/web";
import * as t from "@vencord/discord-types";
import { filters, findAll, findByPropsLazy, waitFor } from "@webpack"; import { filters, findAll, findByPropsLazy, waitFor } from "@webpack";
import { createRoot, React, ReactDOM } from "@webpack/common"; import { createRoot, ReactDOM } from "@webpack/common";
import * as t from "@webpack/types";
export let _cssColors: string[] = []; export let _cssColors: string[] = [];
export type IconsDef = { [k: string]: t.Icon; }; export type IconsDef = { [k: string]: t.Icon; };

View file

@ -9,8 +9,8 @@ import { definePluginSettings } from "@api/Settings";
import { ErrorBoundary } from "@components/index"; import { ErrorBoundary } from "@components/index";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Channel } from "@vencord/discord-types";
import { FluxDispatcher, Menu, React, UserStore } from "@webpack/common"; import { FluxDispatcher, Menu, React, UserStore } from "@webpack/common";
import { Channel } from "discord-types/general";
const ignoredChannelIds = new Set<string>(); const ignoredChannelIds = new Set<string>();

View file

@ -16,9 +16,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext, sendBotMessage } from "@api/Commands"; import { ApplicationCommandInputType, ApplicationCommandOptionType, sendBotMessage } from "@api/Commands";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { CommandArgument, CommandContext } from "@vencord/discord-types";
import { findByPropsLazy } from "@webpack"; import { findByPropsLazy } from "@webpack";
import { DraftType, UploadHandler, UploadManager } from "@webpack/common"; import { DraftType, UploadHandler, UploadManager } from "@webpack/common";
import { applyPalette, GIFEncoder, quantize } from "gifenc"; import { applyPalette, GIFEncoder, quantize } from "gifenc";
@ -44,7 +45,7 @@ function loadImage(source: File | string) {
}); });
} }
async function resolveImage(options: Argument[], ctx: CommandContext): Promise<{ image: File | null; width: number | null; height: number | null; }> { async function resolveImage(options: CommandArgument[], ctx: CommandContext): Promise<{ image: File | null; width: number | null; height: number | null; }> {
let image: File | null = null; let image: File | null = null;
let width: number | null = null; let width: number | null = null;
let height: number | null = null; let height: number | null = null;

View file

@ -7,8 +7,8 @@
import { classNameFactory } from "@api/Styles"; import { classNameFactory } from "@api/Styles";
import ErrorBoundary from "@components/ErrorBoundary"; import ErrorBoundary from "@components/ErrorBoundary";
import { ModalCloseButton, ModalContent, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { ModalCloseButton, ModalContent, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { GuildMember } from "@vencord/discord-types";
import { Forms, Parser } from "@webpack/common"; import { Forms, Parser } from "@webpack/common";
import { GuildMember } from "discord-types/general";
const cl = classNameFactory("vc-inrole-"); const cl = classNameFactory("vc-inrole-");

View file

@ -12,8 +12,8 @@ import { InfoIcon } from "@components/Icons";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { getCurrentChannel, getCurrentGuild } from "@utils/discord"; import { getCurrentChannel, getCurrentGuild } from "@utils/discord";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { GuildMember } from "@vencord/discord-types";
import { Forms, GuildMemberStore, GuildRoleStore, Menu, Parser } from "@webpack/common"; import { Forms, GuildMemberStore, GuildRoleStore, Menu, Parser } from "@webpack/common";
import { GuildMember } from "discord-types/general";
import { showInRoleModal } from "./RoleMembersModal"; import { showInRoleModal } from "./RoleMembersModal";

View file

@ -6,9 +6,9 @@
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { VoiceState } from "@vencord/discord-types";
import { findByCodeLazy } from "@webpack"; import { findByCodeLazy } from "@webpack";
import { ChannelStore, PermissionsBits, PermissionStore, SelectedChannelStore, UserStore } from "@webpack/common"; import { ChannelStore, PermissionsBits, PermissionStore, SelectedChannelStore, UserStore } from "@webpack/common";
import { VoiceState } from "@webpack/types";
import { getCurrentMedia, settings } from "./utils"; import { getCurrentMedia, settings } from "./utils";

View file

@ -16,9 +16,9 @@ import { Margins } from "@utils/margins";
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import { useForceUpdater } from "@utils/react"; import { useForceUpdater } from "@utils/react";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Message, User } from "@vencord/discord-types";
import { findByCodeLazy, findByPropsLazy } from "@webpack"; import { findByCodeLazy, findByPropsLazy } from "@webpack";
import { Button, ChannelStore, FluxDispatcher, Forms, Select, SelectedChannelStore, Switch, TabBar, TextInput, Tooltip, UserStore, useState } from "@webpack/common"; import { Button, ChannelStore, FluxDispatcher, Forms, Select, SelectedChannelStore, Switch, TabBar, TextInput, Tooltip, UserStore, useState } from "@webpack/common";
import { Message, User } from "discord-types/general/index.js";
import type { JSX, PropsWithChildren } from "react"; import type { JSX, PropsWithChildren } from "react";
type IconProps = JSX.IntrinsicElements["svg"]; type IconProps = JSX.IntrinsicElements["svg"];

View file

@ -15,8 +15,8 @@ import { EquicordDevs } from "@utils/constants";
import { Logger } from "@utils/Logger"; import { Logger } from "@utils/Logger";
import { openModal } from "@utils/modal"; import { openModal } from "@utils/modal";
import definePlugin, { OptionType, PluginNative, ReporterTestable } from "@utils/types"; import definePlugin, { OptionType, PluginNative, ReporterTestable } from "@utils/types";
import { Channel } from "@vencord/discord-types";
import { Button, DraftType, FluxDispatcher, Forms, UploadHandler, UploadManager, UserStore } from "@webpack/common"; import { Button, DraftType, FluxDispatcher, Forms, UploadHandler, UploadManager, UserStore } from "@webpack/common";
import { Channel } from "discord-types/general";
import { DependencyModal } from "./DependencyModal"; import { DependencyModal } from "./DependencyModal";

View file

@ -7,8 +7,8 @@
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Channel, Message } from "@vencord/discord-types";
import { ChannelStore, MessageActions, MessageStore, UserStore } from "@webpack/common"; import { ChannelStore, MessageActions, MessageStore, UserStore } from "@webpack/common";
import { Channel, Message } from "discord-types/general";
function shouldEdit(channel: Channel, message: Message, timePeriod: number, shouldMergeWithAttachment: boolean) { function shouldEdit(channel: Channel, message: Message, timePeriod: number, shouldMergeWithAttachment: boolean) {
let should = true; let should = true;

View file

@ -11,9 +11,9 @@ import { openUserProfile } from "@utils/discord";
import { copyWithToast } from "@utils/misc"; import { copyWithToast } from "@utils/misc";
import { closeAllModals, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { closeAllModals, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { LazyComponent } from "@utils/react"; import { LazyComponent } from "@utils/react";
import { User } from "@vencord/discord-types";
import { find, findByCode, findByCodeLazy } from "@webpack"; import { find, findByCode, findByCodeLazy } from "@webpack";
import { Alerts, Button, ChannelStore, ContextMenuApi, FluxDispatcher, Menu, NavigationRouter, React, TabBar, Text, TextInput, Tooltip, useMemo, useRef, useState } from "@webpack/common"; import { Alerts, Button, ChannelStore, ContextMenuApi, FluxDispatcher, Menu, NavigationRouter, React, TabBar, Text, TextInput, Tooltip, useMemo, useRef, useState } from "@webpack/common";
import { User } from "discord-types/general";
import { clearMessagesIDB, DBMessageRecord, deleteMessageIDB, deleteMessagesBulkIDB } from "../db"; import { clearMessagesIDB, DBMessageRecord, deleteMessageIDB, deleteMessagesBulkIDB } from "../db";
import { settings } from "../index"; import { settings } from "../index";

View file

@ -56,6 +56,7 @@ async function messageDeleteHandler(payload: MessageDeletePayload & { isBulk: bo
try { try {
handledMessageIds.add(payload.id); handledMessageIds.add(payload.id);
// @ts-ignore
let message: LoggedMessage | LoggedMessageJSON | null = let message: LoggedMessage | LoggedMessageJSON | null =
oldGetMessage?.(payload.channelId, payload.id); oldGetMessage?.(payload.channelId, payload.id);
if (message == null) { if (message == null) {
@ -152,6 +153,7 @@ async function messageUpdateHandler(payload: MessageUpdatePayload) {
] ]
}; };
// @ts-ignore
cacheSentMessages.set(`${payload.message.channel_id},${payload.message.id}`, message); cacheSentMessages.set(`${payload.message.channel_id},${payload.message.id}`, message);
} }
} }
@ -215,7 +217,7 @@ async function processMessageFetch(response: FetchMessagesResponse) {
for (let j = 0, len2 = message.mentions.length; j < len2; j++) { for (let j = 0, len2 = message.mentions.length; j < len2; j++) {
const user = message.mentions[j]; const user = message.mentions[j];
const cachedUser = fetchUser((user as any).id || user); const cachedUser = fetchUser(user);
if (cachedUser) (message.mentions[j] as any) = cleanupUserObject(cachedUser); if (cachedUser) (message.mentions[j] as any) = cleanupUserObject(cachedUser);
} }

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { Message, MessageAttachment, MessageJSON } from "discord-types/general"; import { Message, MessageAttachment, MessageJSON, User } from "@vencord/discord-types";
export interface LoggedAttachment extends MessageAttachment { export interface LoggedAttachment extends MessageAttachment {
fileExtension?: string | null; fileExtension?: string | null;
@ -35,6 +35,14 @@ export interface LoggedMessageJSON extends Omit<LoggedMessage, "timestamp"> {
ghostPinged?: boolean; ghostPinged?: boolean;
timestamp: string; timestamp: string;
ourCache?: boolean; ourCache?: boolean;
channel_id: string;
id: string;
author: User;
flags: number;
bot: boolean;
mentions: string[];
content: string;
webhookId: string | undefined;
referenced_message: RefrencedMessage; referenced_message: RefrencedMessage;
message_reference: RefrencedMessage; message_reference: RefrencedMessage;
} }
@ -47,6 +55,14 @@ export interface LoggedMessage extends Message {
timestamp: string; timestamp: string;
content: string; content: string;
}[]; }[];
channel_id: string;
id: string;
author: User;
flags: number;
bot: boolean;
mentions: string[];
content: string;
webhookId: string | undefined;
} }
export interface MessageDeletePayload { export interface MessageDeletePayload {

View file

@ -16,8 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { User } from "@vencord/discord-types";
import { MessageStore } from "@webpack/common"; import { MessageStore } from "@webpack/common";
import { User } from "discord-types/general";
import { LoggedMessageJSON, RefrencedMessage } from "../types"; import { LoggedMessageJSON, RefrencedMessage } from "../types";
import { getGuildIdByChannel, isGhostPinged } from "./index"; import { getGuildIdByChannel, isGhostPinged } from "./index";
@ -111,6 +111,6 @@ export function cleanupUserObject(user: User) {
avatar: user.avatar, avatar: user.avatar,
id: user.id, id: user.id,
bot: user.bot, bot: user.bot,
public_flags: typeof user.publicFlags !== "undefined" ? user.publicFlags : (user as any).public_flags public_flags: typeof user.publicFlags !== "undefined" ? user.publicFlags : user.publicFlags
}; };
} }

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { MessageAttachment } from "discord-types/general"; import { MessageAttachment } from "@vencord/discord-types";
import { Flogger, settings } from "../.."; import { Flogger, settings } from "../..";
import { LoggedAttachment, LoggedMessage, LoggedMessageJSON } from "../../types"; import { LoggedAttachment, LoggedMessage, LoggedMessageJSON } from "../../types";

View file

@ -9,8 +9,8 @@ import "./style.css";
import { FFmpeg } from "@ffmpeg/ffmpeg"; import { FFmpeg } from "@ffmpeg/ffmpeg";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Channel } from "@vencord/discord-types";
import { React } from "@webpack/common"; import { React } from "@webpack/common";
import { Channel } from "discord-types/general";
import { PickerContent, PickerHeader, PickerSidebar, Settings, Wrapper } from "./components"; import { PickerContent, PickerHeader, PickerSidebar, Settings, Wrapper } from "./components";
import { getStickerPack, getStickerPackMetas } from "./stickers"; import { getStickerPack, getStickerPackMetas } from "./stickers";

View file

@ -21,8 +21,8 @@ import { makeRange } from "@components/PluginSettings/components/SettingSliderCo
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { sleep } from "@utils/misc"; import { sleep } from "@utils/misc";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Message, ReactionEmoji } from "@vencord/discord-types";
import { RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common"; import { RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common";
import { Message, ReactionEmoji } from "discord-types/general";
interface IMessageCreate { interface IMessageCreate {
type: "MESSAGE_CREATE"; type: "MESSAGE_CREATE";

View file

@ -6,8 +6,8 @@
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { User } from "@vencord/discord-types";
import { UserStore } from "@webpack/common"; import { UserStore } from "@webpack/common";
import { User } from "discord-types/general";
let user: ModifiedUser | undefined; let user: ModifiedUser | undefined;
let lastUserId: string | undefined; let lastUserId: string | undefined;

View file

@ -18,8 +18,8 @@
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Message } from "@vencord/discord-types";
import { findComponentByCodeLazy } from "@webpack"; import { findComponentByCodeLazy } from "@webpack";
import { Message } from "discord-types/general";
const PinIcon = findComponentByCodeLazy("1-.06-.63L6.16"); const PinIcon = findComponentByCodeLazy("1-.06-.63L6.16");
export default definePlugin({ export default definePlugin({

View file

@ -21,8 +21,8 @@ import "@equicordplugins/_misc/styles.css";
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands"; import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Channel, Message } from "@vencord/discord-types";
import { Forms, MessageActions, MessageStore, UserStore } from "@webpack/common"; import { Forms, MessageActions, MessageStore, UserStore } from "@webpack/common";
import { Channel, Message } from "discord-types/general";
async function deleteMessages(amount: number, channel: Channel, delay: number = 1500): Promise<number> { async function deleteMessages(amount: number, channel: Channel, delay: number = 1500): Promise<number> {
let deleted = 0; let deleted = 0;

View file

@ -10,8 +10,8 @@ import { Devs } from "@utils/constants";
import { getCurrentChannel } from "@utils/discord"; import { getCurrentChannel } from "@utils/discord";
import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Message } from "@vencord/discord-types";
import { Button, Menu, Select, Switch, Text, UploadHandler, useEffect, useState } from "@webpack/common"; import { Button, Menu, Select, Switch, Text, UploadHandler, useEffect, useState } from "@webpack/common";
import { Message } from "discord-types/general";
import { QuoteIcon } from "./components"; import { QuoteIcon } from "./components";
import { canvasToBlob, fetchImageAsBlob, FixUpQuote, wrapText } from "./utils"; import { canvasToBlob, fetchImageAsBlob, FixUpQuote, wrapText } from "./utils";

View file

@ -23,8 +23,8 @@ import { EquicordDevs } from "@utils/constants";
import { sendMessage } from "@utils/discord"; import { sendMessage } from "@utils/discord";
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Message } from "@vencord/discord-types";
import { ChannelStore, Menu } from "@webpack/common"; import { ChannelStore, Menu } from "@webpack/common";
import { Message } from "discord-types/general";
function RepeatMessageIcon({ className }: { className?: string; }) { function RepeatMessageIcon({ className }: { className?: string; }) {
return ( return (

View file

@ -7,8 +7,8 @@
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { MessageJSON } from "@vencord/discord-types";
import { MessageStore, UserStore } from "@webpack/common"; import { MessageStore, UserStore } from "@webpack/common";
import { MessageJSON } from "discord-types/general";
export const settings = definePluginSettings({ export const settings = definePluginSettings({
alwaysPingOnReply: { alwaysPingOnReply: {

View file

@ -8,8 +8,8 @@ import { DataStore } from "@api/index";
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType, PluginNative } from "@utils/types"; import definePlugin, { OptionType, PluginNative } from "@utils/types";
import { Message } from "@vencord/discord-types";
import { ApplicationAssetUtils, FluxDispatcher, UserStore } from "@webpack/common"; import { ApplicationAssetUtils, FluxDispatcher, UserStore } from "@webpack/common";
import { Message } from "discord-types/general";
export async function getApplicationAsset(key: string): Promise<string> { export async function getApplicationAsset(key: string): Promise<string> {
if (/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(key)) return "mp:" + key.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//, ""); if (/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(key)) return "mp:" + key.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//, "");

View file

@ -5,7 +5,7 @@
*/ */
import { MessageObject } from "@api/MessageEvents"; import { MessageObject } from "@api/MessageEvents";
import { Message } from "discord-types/general"; import { Message } from "@vencord/discord-types";
export async function transferMessage(message: MessageObject, model: string, repliedMessage?: Message) { export async function transferMessage(message: MessageObject, model: string, repliedMessage?: Message) {
// you can use this on anything really // you can use this on anything really

View file

@ -14,7 +14,7 @@ const roleIconClassName = findByPropsLazy("roleIcon", "separator").roleIcon;
const RoleIconComponent = findComponentByCodeLazy("#{intl::ROLE_ICON_ALT_TEXT}"); const RoleIconComponent = findComponentByCodeLazy("#{intl::ROLE_ICON_ALT_TEXT}");
import "./styles.css"; import "./styles.css";
import { User } from "discord-types/general"; import { User } from "@vencord/discord-types";
import { JSX } from "react"; import { JSX } from "react";
import settings from "./settings"; import settings from "./settings";

View file

@ -8,6 +8,7 @@ import { NavContextMenuPatchCallback } from "@api/ContextMenu";
import ErrorBoundary from "@components/ErrorBoundary"; import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Channel, User } from "@vencord/discord-types";
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
import { import {
ChannelRouter, ChannelRouter,
@ -22,7 +23,6 @@ import {
UserStore, UserStore,
useStateFromStores useStateFromStores
} from "@webpack/common"; } from "@webpack/common";
import { Channel, User } from "discord-types/general";
import { SidebarStore } from "./store"; import { SidebarStore } from "./store";
@ -149,7 +149,7 @@ export default definePlugin({
}} }}
/> />
<HeaderBarIcon <HeaderBarIcon
icon={() => (<XSmallIcon style={{ width: "24px",height: "24px" }} />)} icon={() => (<XSmallIcon style={{ width: "24px", height: "24px" }} />)}
tooltip="Close Sidebar Chat" tooltip="Close Sidebar Chat"
onClick={() => { onClick={() => {
FluxDispatcher.dispatch({ FluxDispatcher.dispatch({

View file

@ -5,9 +5,9 @@
*/ */
import { proxyLazy } from "@utils/lazy"; import { proxyLazy } from "@utils/lazy";
import { Channel, Guild } from "@vencord/discord-types";
import { findByPropsLazy } from "@webpack"; import { findByPropsLazy } from "@webpack";
import { ChannelStore, Flux, FluxDispatcher, GuildStore } from "@webpack/common"; import { ChannelStore, Flux, FluxDispatcher, GuildStore } from "@webpack/common";
import { Channel, Guild } from "discord-types/general";
// cant destructure, otherwise context is lost // cant destructure, otherwise context is lost
const DMChannelHandler = findByPropsLazy("getOrEnsurePrivateChannel"); const DMChannelHandler = findByPropsLazy("getOrEnsurePrivateChannel");

View file

@ -9,9 +9,9 @@ import { Flex } from "@components/Flex";
import { Margins } from "@utils/margins"; import { Margins } from "@utils/margins";
import { classes, copyWithToast } from "@utils/misc"; import { classes, copyWithToast } from "@utils/misc";
import { closeModal, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { closeModal, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { User } from "@vencord/discord-types";
import { findComponentByCodeLazy } from "@webpack"; import { findComponentByCodeLazy } from "@webpack";
import { Button, Clickable, Forms, Text, Tooltip, useEffect, UserUtils, useState } from "@webpack/common"; import { Button, Clickable, Forms, Text, Tooltip, useEffect, UserUtils, useState } from "@webpack/common";
import { User } from "discord-types/general";
import settings from "../settings"; import settings from "../settings";
import { clearLoggedSounds, getLoggedSounds } from "../store"; import { clearLoggedSounds, getLoggedSounds } from "../store";

View file

@ -8,8 +8,8 @@ import { classNameFactory } from "@api/Styles";
import { proxyLazy } from "@utils/lazy"; import { proxyLazy } from "@utils/lazy";
import { LazyComponent } from "@utils/react"; import { LazyComponent } from "@utils/react";
import { saveFile } from "@utils/web"; import { saveFile } from "@utils/web";
import type { User } from "@vencord/discord-types";
import { findByCode, findByProps, findByPropsLazy } from "@webpack"; import { findByCode, findByProps, findByPropsLazy } from "@webpack";
import type { User } from "discord-types/general";
import settings from "./settings"; import settings from "./settings";

View file

@ -10,8 +10,8 @@ import { OpenExternalIcon } from "@components/Icons";
import { proxyLazy } from "@utils/lazy"; import { proxyLazy } from "@utils/lazy";
import { Margins } from "@utils/margins"; import { Margins } from "@utils/margins";
import { ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { User } from "@vencord/discord-types";
import { Button, Card, FluxDispatcher, Forms, Parser, React, UserStore, UserUtils } from "@webpack/common"; import { Button, Card, FluxDispatcher, Forms, Parser, React, UserStore, UserUtils } from "@webpack/common";
import { User } from "discord-types/general";
import { Constructor } from "type-fest"; import { Constructor } from "type-fest";
import type { Theme, ThemeLikeProps } from "../types"; import type { Theme, ThemeLikeProps } from "../types";

View file

@ -5,7 +5,7 @@
*/ */
import { ModalProps } from "@utils/modal"; import { ModalProps } from "@utils/modal";
import { User } from "discord-types/general"; import { User } from "@vencord/discord-types";
type Author = { type Author = {
github_name?: string; github_name?: string;

View file

@ -13,9 +13,9 @@ import ErrorBoundary from "@components/ErrorBoundary";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import { openModal } from "@utils/modal"; import { openModal } from "@utils/modal";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Message, User } from "@vencord/discord-types";
import { findByPropsLazy } from "@webpack"; import { findByPropsLazy } from "@webpack";
import { Button, Menu, showToast, Toasts, Tooltip, useEffect, UserStore, useState } from "@webpack/common"; import { Button, Menu, showToast, Toasts, Tooltip, useEffect, UserStore, useState } from "@webpack/common";
import { Message, User } from "discord-types/general";
import { deleteTimezone, getTimezone, loadDatabaseTimezones, setUserDatabaseTimezone } from "./database"; import { deleteTimezone, getTimezone, loadDatabaseTimezones, setUserDatabaseTimezone } from "./database";
import { SetTimezoneModal } from "./TimezoneModal"; import { SetTimezoneModal } from "./TimezoneModal";

View file

@ -20,9 +20,9 @@ import { definePluginSettings } from "@api/Settings";
import { makeRange } from "@components/PluginSettings/components"; import { makeRange } from "@components/PluginSettings/components";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Channel, Message, User } from "@vencord/discord-types";
import { findByPropsLazy, findStore } from "@webpack"; import { findByPropsLazy, findStore } from "@webpack";
import { Button, ChannelStore, GuildRoleStore, NavigationRouter, RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common"; import { Button, ChannelStore, GuildRoleStore, NavigationRouter, RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common";
import { Channel, Message, User } from "discord-types/general";
import { ReactNode } from "react"; import { ReactNode } from "react";
import { NotificationData, showNotification } from "./components/Notifications"; import { NotificationData, showNotification } from "./components/Notifications";

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: GPL-3.0-or-later * SPDX-License-Identifier: GPL-3.0-or-later
*/ */
import { Message } from "@vencord/discord-types";
import { Parser, useEffect, useState } from "@webpack/common"; import { Parser, useEffect, useState } from "@webpack/common";
import { Message } from "discord-types/general";
import { languages } from "../misc/languages"; import { languages } from "../misc/languages";
import { cl, Translation } from "../misc/types"; import { cl, Translation } from "../misc/types";

View file

@ -17,8 +17,8 @@
*/ */
import { classNameFactory } from "@api/Styles"; import { classNameFactory } from "@api/Styles";
import { Message } from "@vencord/discord-types";
import { useState } from "@webpack/common"; import { useState } from "@webpack/common";
import { Message } from "discord-types/general";
export const conversions = new Map<string, (conv: string) => void>(); export const conversions = new Map<string, (conv: string) => void>();
const cl = classNameFactory("vc-converter-"); const cl = classNameFactory("vc-converter-");

View file

@ -10,9 +10,9 @@ import { definePluginSettings } from "@api/Settings";
import ErrorBoundary from "@components/ErrorBoundary"; import ErrorBoundary from "@components/ErrorBoundary";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Channel } from "@vencord/discord-types";
import { findStoreLazy } from "@webpack"; import { findStoreLazy } from "@webpack";
import { ReadStateStore, useStateFromStores } from "@webpack/common"; import { ReadStateStore, useStateFromStores } from "@webpack/common";
import { Channel } from "discord-types/general";
import { JSX } from "react"; import { JSX } from "react";
const UserGuildSettingsStore = findStoreLazy("UserGuildSettingsStore"); const UserGuildSettingsStore = findStoreLazy("UserGuildSettingsStore");

View file

@ -8,7 +8,7 @@ import { definePluginSettings } from "@api/Settings";
import { Link } from "@components/Link"; import { Link } from "@components/Link";
import { EquicordDevs } from "@utils/constants"; import { EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { User } from "discord-types/general"; import { User } from "@vencord/discord-types";
let data = { let data = {
avatars: {} as Record<string, string>, avatars: {} as Record<string, string>,

View file

@ -217,7 +217,7 @@ function getTypeAndChannelId(
function playSample(tempSettings: any, type: string) { function playSample(tempSettings: any, type: string) {
const s = Object.assign({}, settings.plain, tempSettings); const s = Object.assign({}, settings.plain, tempSettings);
const currentUser = UserStore.getCurrentUser(); const currentUser = UserStore.getCurrentUser();
const myGuildId = SelectedGuildStore.getGuildId(); const myGuildId = SelectedGuildStore.getGuildId()!;
speak( speak(
formatText( formatText(
@ -312,7 +312,7 @@ export default definePlugin({
settings, settings,
flux: { flux: {
VOICE_STATE_UPDATES({ voiceStates }: { voiceStates: VoiceState[]; }) { VOICE_STATE_UPDATES({ voiceStates }: { voiceStates: VoiceState[]; }) {
const myGuildId = SelectedGuildStore.getGuildId(); const myGuildId = SelectedGuildStore.getGuildId()!;
const myChanId = SelectedChannelStore.getVoiceChannelId(); const myChanId = SelectedChannelStore.getVoiceChannelId();
const myId = UserStore.getCurrentUser().id; const myId = UserStore.getCurrentUser().id;

View file

@ -8,10 +8,9 @@ import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import { isTruthy } from "@utils/guards"; import { isTruthy } from "@utils/guards";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Channel, FluxStore } from "@vencord/discord-types";
import { findByPropsLazy, findStoreLazy } from "@webpack"; import { findByPropsLazy, findStoreLazy } from "@webpack";
import { ApplicationAssetUtils, ChannelStore, FluxDispatcher, GuildStore, IconUtils, PresenceStore, RelationshipStore, SelectedChannelStore, SelectedGuildStore, UserStore } from "@webpack/common"; import { ApplicationAssetUtils, ChannelStore, FluxDispatcher, GuildStore, IconUtils, PresenceStore, RelationshipStore, SelectedChannelStore, SelectedGuildStore, UserStore } from "@webpack/common";
import { FluxStore } from "@webpack/types";
import { Channel } from "discord-types/general";
const presenceStore = findByPropsLazy("getLocalPresence"); const presenceStore = findByPropsLazy("getLocalPresence");
const GuildMemberCountStore = findStoreLazy("GuildMemberCountStore") as FluxStore & { getMemberCount(guildId: string): number | null; }; const GuildMemberCountStore = findStoreLazy("GuildMemberCountStore") as FluxStore & { getMemberCount(guildId: string): number | null; };
@ -213,7 +212,7 @@ function totalFriendCount(): number {
function memberCount(): string { function memberCount(): string {
const channelId = SelectedChannelStore.getChannelId(); const channelId = SelectedChannelStore.getChannelId();
const guildId = SelectedGuildStore.getGuildId(); const guildId = SelectedGuildStore.getGuildId()!;
const { groups } = ChannelMemberStore.getProps(guildId, channelId); const { groups } = ChannelMemberStore.getProps(guildId, channelId);
const total = GuildMemberCountStore.getMemberCount(guildId); const total = GuildMemberCountStore.getMemberCount(guildId);
@ -265,7 +264,7 @@ async function createActivity(): Promise<Activity | undefined> {
const channelId = SelectedChannelStore.getChannelId(); const channelId = SelectedChannelStore.getChannelId();
const guildId = SelectedGuildStore.getGuildId(); const guildId = SelectedGuildStore.getGuildId()!;
const voiceId = SelectedChannelStore.getVoiceChannelId(); const voiceId = SelectedChannelStore.getVoiceChannelId();
const currentUser = UserStore.getCurrentUser(); const currentUser = UserStore.getCurrentUser();
if (userAvatarAsSmallImage) imageSmall = currentUser.getAvatarURL(undefined, undefined, true) || chino; if (userAvatarAsSmallImage) imageSmall = currentUser.getAvatarURL(undefined, undefined, true) || chino;

View file

@ -20,8 +20,8 @@ import {
openModal, openModal,
} from "@utils/modal"; } from "@utils/modal";
import definePlugin from "@utils/types"; import definePlugin from "@utils/types";
import { Message } from "@vencord/discord-types";
import { Forms, Menu, Text } from "@webpack/common"; import { Forms, Menu, Text } from "@webpack/common";
import { Message } from "discord-types/general";
type CustomMessage = Message & { type CustomMessage = Message & {
editHistory?: any; editHistory?: any;

View file

@ -7,8 +7,8 @@
import "./VoiceChannelLogEntryComponent.css"; import "./VoiceChannelLogEntryComponent.css";
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import { Channel } from "@vencord/discord-types";
import { React, Timestamp, Tooltip, UserStore } from "@webpack/common"; import { React, Timestamp, Tooltip, UserStore } from "@webpack/common";
import { Channel } from "discord-types/general";
import { Util } from "Vencord"; import { Util } from "Vencord";
import { cl } from ".."; import { cl } from "..";

View file

@ -5,8 +5,8 @@
*/ */
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import { Channel } from "@vencord/discord-types";
import { React } from "@webpack/common"; import { React } from "@webpack/common";
import { Channel } from "discord-types/general";
import { cl } from ".."; import { cl } from "..";
import { VoiceChannelLogEntry } from "../logs"; import { VoiceChannelLogEntry } from "../logs";

View file

@ -6,9 +6,9 @@
import { classes } from "@utils/misc"; import { classes } from "@utils/misc";
import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal"; import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
import { Channel } from "@vencord/discord-types";
import { findStoreLazy } from "@webpack"; import { findStoreLazy } from "@webpack";
import { React, ScrollerThin, Text } from "@webpack/common"; import { React, ScrollerThin, Text } from "@webpack/common";
import { Channel } from "discord-types/general";
import { cl } from ".."; import { cl } from "..";
import { getVcLogs, vcLogSubscribe } from "../logs"; import { getVcLogs, vcLogSubscribe } from "../logs";

View file

@ -9,9 +9,9 @@ import { definePluginSettings } from "@api/Settings";
import { classNameFactory } from "@api/Styles"; import { classNameFactory } from "@api/Styles";
import { Devs, EquicordDevs } from "@utils/constants"; import { Devs, EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import { Message, User } from "@vencord/discord-types";
import { findByCodeLazy } from "@webpack"; import { findByCodeLazy } from "@webpack";
import { FluxDispatcher, Menu, MessageActions, MessageStore, RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common"; import { FluxDispatcher, Menu, MessageActions, MessageStore, RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common";
import { Message, User } from "discord-types/general";
import { openVoiceChannelLog } from "./components/VoiceChannelLogModal"; import { openVoiceChannelLog } from "./components/VoiceChannelLogModal";
import { addLogEntry } from "./logs"; import { addLogEntry } from "./logs";

View file

@ -9,8 +9,8 @@ import { definePluginSettings } from "@api/Settings";
import { makeRange } from "@components/PluginSettings/components"; import { makeRange } from "@components/PluginSettings/components";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType } from "@utils/types";
import type { Channel } from "@vencord/discord-types";
import { GuildChannelStore, Menu, React, RestAPI, UserStore, VoiceStateStore } from "@webpack/common"; import { GuildChannelStore, Menu, React, RestAPI, UserStore, VoiceStateStore } from "@webpack/common";
import type { Channel } from "discord-types/general";
async function runSequential<T>(promises: Promise<T>[]): Promise<T[]> { async function runSequential<T>(promises: Promise<T>[]): Promise<T[]> {
const results: T[] = []; const results: T[] = [];

Some files were not shown because too many files have changed in this diff Show more