Fixes
This commit is contained in:
parent
8c6dfd86ed
commit
91d3a67657
109 changed files with 225 additions and 133 deletions
|
|
@ -48,7 +48,7 @@
|
|||
"fflate": "^0.8.2",
|
||||
"gifenc": "github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3",
|
||||
"jsqr": "1.4.0",
|
||||
"idb": "8.0.0",
|
||||
"idb": "8.0.3",
|
||||
"monaco-editor": "^0.52.2",
|
||||
"nanoid": "^5.1.5",
|
||||
"socket.io": "^4.8.1",
|
||||
|
|
|
|||
1
packages/discord-types/src/components.d.ts
vendored
1
packages/discord-types/src/components.d.ts
vendored
|
|
@ -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";
|
||||
|
||||
// copy(find(m => Array.isArray(m) && m.includes("heading-sm/normal")).map(JSON.stringify).join("|"))
|
||||
|
|
|
|||
2
packages/discord-types/src/index.d.ts
vendored
2
packages/discord-types/src/index.d.ts
vendored
|
|
@ -5,5 +5,7 @@ export * from "./flux";
|
|||
export * from "./fluxEvents";
|
||||
export * from "./menu";
|
||||
export * from "./stores";
|
||||
export * from "./passiveupdatestate";
|
||||
export * from "./utils";
|
||||
export * from "./voicestate";
|
||||
export * as Webpack from "../webpack";
|
||||
|
|
|
|||
|
|
@ -4,18 +4,35 @@ export class RelationshipStore extends FluxStore {
|
|||
getFriendIDs(): string[];
|
||||
getIgnoredIDs(): string[];
|
||||
getBlockedIDs(): string[];
|
||||
getBlockedOrIgnoredIDs(): string[];
|
||||
|
||||
getPendingCount(): number;
|
||||
getRelationshipCount(): number;
|
||||
|
||||
/** Related to friend nicknames. */
|
||||
getNickname(userId: string): string;
|
||||
|
||||
/** @returns Enum value from constants.RelationshipTypes */
|
||||
getRelationshipType(userId: string): number;
|
||||
isFriend(userId: string): boolean;
|
||||
isBlockedOrIgnored(userId: string): boolean;
|
||||
isBlockedOrIgnoredForMessage(userId: string): boolean;
|
||||
isBlocked(userId: string): boolean;
|
||||
isBlockedForMessage(userId: string): boolean;
|
||||
isFriend(userId: string): boolean;
|
||||
isIgnored(userId: string): boolean;
|
||||
isIgnoredForMessage(userId: string): boolean;
|
||||
isUnfilteredPendingIncoming(userId: string): boolean;
|
||||
isSpam(userId): boolean;
|
||||
getSince(userId: string): string;
|
||||
getSinces(): Record<number, string>;
|
||||
|
||||
getFriendCount(): number;
|
||||
getPendingCount(): number;
|
||||
getPendingIgnoredCount(): number;
|
||||
getSpamCount(): number;
|
||||
getRelationshipCount(): number;
|
||||
getOutgoingCount(): number;
|
||||
|
||||
getMutableRelationships(): Map<string, number>;
|
||||
getVersion(): number;
|
||||
}
|
||||
|
|
|
|||
60
packages/discord-types/src/stores/StickerStore.d.ts
vendored
Normal file
60
packages/discord-types/src/stores/StickerStore.d.ts
vendored
Normal 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;
|
||||
}
|
||||
1
packages/discord-types/src/stores/index.d.ts
vendored
1
packages/discord-types/src/stores/index.d.ts
vendored
|
|
@ -13,6 +13,7 @@ export * from "./SelectedGuildStore";
|
|||
export * from "./ThemeStore";
|
||||
export * from "./UserStore";
|
||||
export * from "./WindowStore";
|
||||
export * from "./StickerStore";
|
||||
|
||||
/**
|
||||
* React hook that returns stateful data for one or more stores
|
||||
|
|
|
|||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
|
|
@ -50,8 +50,8 @@ importers:
|
|||
specifier: github:mattdesl/gifenc#64842fca317b112a8590f8fef2bf3825da8f6fe3
|
||||
version: https://codeload.github.com/mattdesl/gifenc/tar.gz/64842fca317b112a8590f8fef2bf3825da8f6fe3
|
||||
idb:
|
||||
specifier: 8.0.0
|
||||
version: 8.0.0
|
||||
specifier: 8.0.3
|
||||
version: 8.0.3
|
||||
jsqr:
|
||||
specifier: 1.4.0
|
||||
version: 1.4.0
|
||||
|
|
@ -1519,8 +1519,8 @@ packages:
|
|||
humanize-ms@1.2.1:
|
||||
resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
|
||||
|
||||
idb@8.0.0:
|
||||
resolution: {integrity: sha512-l//qvlAKGmQO31Qn7xdzagVPPaHTxXx199MhrAFuVBTPqydcPYBWjkrbv4Y0ktB+GmWOiwHl237UUOrLmQxLvw==}
|
||||
idb@8.0.3:
|
||||
resolution: {integrity: sha512-LtwtVyVYO5BqRvcsKuB2iUMnHwPVByPCXFXOpuU96IZPPoPN6xjOGxZQ74pgSVVLQWtUOYgyeL4GE98BY5D3wg==}
|
||||
|
||||
ieee754@1.2.1:
|
||||
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
|
||||
|
|
@ -4015,7 +4015,7 @@ snapshots:
|
|||
dependencies:
|
||||
ms: 2.1.2
|
||||
|
||||
idb@8.0.0: {}
|
||||
idb@8.0.3: {}
|
||||
|
||||
ieee754@1.2.1: {}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
*/
|
||||
|
||||
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 {
|
||||
label: string;
|
||||
|
|
@ -31,7 +32,7 @@ export function SettingSelectComponent({ label, name, options, default: def, the
|
|||
value: option.value,
|
||||
default: def === option.name,
|
||||
label: option.label
|
||||
} satisfies ComponentTypes.SelectOption)), [options, def]);
|
||||
} satisfies SelectOption)), [options, def]);
|
||||
|
||||
return (
|
||||
<Forms.FormSection>
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { PassiveUpdateState, VoiceState } from "@vencord/discord-types";
|
||||
import { FluxDispatcher, GuildStore, UserStore } from "@webpack/common";
|
||||
import { PassiveUpdateState, VoiceState } from "@webpack/types";
|
||||
|
||||
import { Timer } from "./Timer";
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { EquicordDevs } from "@utils/constants";
|
||||
import { openUserProfile } from "@utils/discord";
|
||||
import definePlugin from "@utils/types";
|
||||
import { User } from "discord-types/general";
|
||||
import { User } from "@vencord/discord-types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "AlwaysExpandProfile",
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { disableStyle, enableStyle } from "@api/Styles";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType, Plugin } from "@utils/types";
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { findStoreLazy } from "@webpack";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
import style from "./style.css?managed";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* 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";
|
||||
|
||||
export interface Timestamp {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import { definePluginSettings, Settings } from "@api/Settings";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { MessageJSON } from "discord-types/general";
|
||||
import { MessageJSON } from "@vencord/discord-types";
|
||||
|
||||
let blockedKeywords: Array<RegExp>;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import { Devs } from "@utils/constants";
|
|||
import { getCurrentChannel } from "@utils/discord";
|
||||
import { Logger } from "@utils/Logger";
|
||||
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 type { Message } from "discord-types/general";
|
||||
import { JSX } from "react";
|
||||
|
||||
interface IMessageCreate {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import "./style.css";
|
|||
import { EquicordDevs } from "@utils/constants";
|
||||
import { getCurrentGuild } from "@utils/discord";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Channel, Guild } from "@vencord/discord-types";
|
||||
import { ChannelStore, SelectedGuildStore } from "@webpack/common";
|
||||
import { Channel, Guild } from "discord-types/general";
|
||||
|
||||
import { isEnabled, returnChannelBadge, settings } from "./settings";
|
||||
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
import { classNameFactory } from "@api/Styles";
|
||||
import { getGuildAcronym, getIntlMessage, getUniqueUsername } from "@utils/discord";
|
||||
import { classes } from "@utils/misc";
|
||||
import { Channel, Guild, User } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
|
||||
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 { TabContextMenu } from "./ContextMenus";
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/Co
|
|||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Channel, Message } from "@vencord/discord-types";
|
||||
import { ChannelStore, Menu } from "@webpack/common";
|
||||
import { Channel, Message } from "discord-types/general";
|
||||
import { JSX } from "react";
|
||||
|
||||
import ChannelsTabsContainer from "./components/ChannelTabsContainer";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Channel } from "discord-types/general";
|
||||
import { Channel } from "@vencord/discord-types";
|
||||
|
||||
export default definePlugin({
|
||||
name: "CleanChannelName",
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { GuildMember } from "@vencord/discord-types";
|
||||
import { ChannelStore, GuildMemberStore, GuildRoleStore, RelationshipStore, Text, UserStore } from "@webpack/common";
|
||||
import { GuildMember } from "discord-types/general";
|
||||
|
||||
const settings = definePluginSettings(
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import { Link } from "@components/Link";
|
|||
import { Devs } from "@utils/constants";
|
||||
import { ModalAPI } from "@utils/modal";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { SelectOption } from "@vencord/discord-types";
|
||||
import { findStoreLazy } from "@webpack";
|
||||
import { PresenceStore, UserStore } from "@webpack/common";
|
||||
import { SelectOption } from "@webpack/types";
|
||||
|
||||
interface Activity {
|
||||
name: string;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import { NavContextMenuPatchCallback } from "@api/ContextMenu";
|
|||
import { copyToClipboard } from "@utils/clipboard";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import type { Channel, User } from "@vencord/discord-types";
|
||||
import { Menu } from "@webpack/common";
|
||||
import type { Channel, User } from "discord-types/general";
|
||||
|
||||
const MentionIcon = () => (
|
||||
<svg
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ import { definePluginSettings, Settings } from "@api/Settings";
|
|||
import { EquicordDevs } from "@utils/constants";
|
||||
import { openModal } from "@utils/modal";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { extractAndLoadChunksLazy } from "@webpack";
|
||||
import { Menu } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
import { SetColorModal } from "./SetColorModal";
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import { addMessagePreSendListener, MessageSendListener, removeMessagePreSendLis
|
|||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import { sleep } from "@utils/misc";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import {
|
||||
ChannelActionCreators,
|
||||
FluxDispatcher, MessageActions, RestAPI,
|
||||
|
|
@ -22,7 +23,6 @@ import {
|
|||
useEffect, UserStore,
|
||||
UserUtils, useState,
|
||||
} from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
const CloudUpload = findLazy(m => m.prototype?.trackUploadFinished);
|
||||
|
||||
import { getCurrentChannel } from "@utils/discord";
|
||||
|
|
|
|||
|
|
@ -4,10 +4,9 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { Channel, Guild, Message, RC, User } from "@vencord/discord-types";
|
||||
import { findByCodeLazy, findLazy } from "@webpack";
|
||||
import { GuildStore } from "@webpack/common";
|
||||
import { RC } from "@webpack/types";
|
||||
import { Channel, Guild, Message, User } from "discord-types/general";
|
||||
|
||||
import { settings } from "./settings";
|
||||
import type { ITag } from "./types";
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import { classNameFactory } from "@api/Styles";
|
|||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import { getCurrentChannel, getIntlMessage } from "@utils/discord";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Channel, Message, User } from "@vencord/discord-types";
|
||||
import { ChannelStore, GuildStore, PermissionsBits, SelectedChannelStore, UserStore } from "@webpack/common";
|
||||
import { Channel, Message, User } from "discord-types/general";
|
||||
|
||||
import { computePermissions, Tag, tags } from "./consts";
|
||||
import { settings } from "./settings";
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import type { Permissions } from "@webpack/types";
|
||||
import type { Channel, Message, User } from "discord-types/general";
|
||||
import type { Channel, Message, Permissions, User } from "@vencord/discord-types";
|
||||
|
||||
import { tags } from "./consts";
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import { EquicordDevs } from "@utils/constants";
|
|||
import { showItemInFolder } from "@utils/native";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { saveFile } from "@utils/web";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { Menu } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
const settings = definePluginSettings({
|
||||
openFileAfterExport: {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import { copyWithToast } from "@utils/misc";
|
||||
import type { Guild } from "@vencord/discord-types";
|
||||
import { Button, showToast, Switch, UserStore, useState, useToken } from "@webpack/common";
|
||||
import type { Guild } from "discord-types/general";
|
||||
|
||||
import { buildFPTE } from "../lib/fpte";
|
||||
import { useAccentColor, usePrimaryColor, useProfileEffect, useShowPreview } from "../lib/profilePreview";
|
||||
|
|
@ -25,7 +25,7 @@ export function Builder({ guild }: BuilderProps) {
|
|||
|
||||
const avatarColors = useAvatarColors(
|
||||
UserStore.getCurrentUser()?.getAvatarURL(guild?.id, 80),
|
||||
useToken(tokens.unsafe_rawColors.PRIMARY_530).hex(),
|
||||
useToken(tokens.unsafe_rawColors.PRIMARY_530 as any).hex(),
|
||||
false
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,8 @@
|
|||
*/
|
||||
|
||||
import { type ModalProps, openModal } from "@utils/modal";
|
||||
import type { Guild, useToken } from "@vencord/discord-types";
|
||||
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 { ProfileEffectConfig } from "../lib/profileEffects";
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import type { FluxStore } from "@vencord/discord-types";
|
||||
import { findByCodeLazy, findStoreLazy } from "@webpack";
|
||||
import type { FluxStore } from "@webpack/types";
|
||||
import type { SnakeCasedProperties } from "type-fest";
|
||||
|
||||
export const ProfileEffectStore: FluxStore & {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { ModalCloseButton } from "@utils/modal";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { Paginator, React, useRef, useState } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
import { MutableRefObject } from "react";
|
||||
|
||||
import { jumper } from "./index";
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ import { addMessagePopoverButton, removeMessagePopoverButton } from "@api/Messag
|
|||
import { disableStyle, enableStyle } from "@api/Styles";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { ChannelStore, createRoot, MessageStore, Toasts } from "@webpack/common";
|
||||
import Message from "discord-types/general/Message";
|
||||
import { Root } from "react-dom/client";
|
||||
|
||||
import ReplyNavigator from "./ReplyNavigator";
|
||||
|
|
|
|||
|
|
@ -10,10 +10,9 @@ import { NavContextMenuPatchCallback } from "@api/ContextMenu";
|
|||
import { definePluginSettings } from "@api/Settings";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Channel, User, VoiceState } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findStoreLazy } from "@webpack";
|
||||
import { Forms, Menu, React, VoiceStateStore } from "@webpack/common";
|
||||
import { VoiceState } from "@webpack/types";
|
||||
import { Channel, User } from "discord-types/general";
|
||||
|
||||
type TFollowedUserInfo = {
|
||||
lastChannelId: string;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { EquicordDevs } from "@utils/constants";
|
||||
import { sendMessage } from "@utils/discord";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Message } from "discord-types/general";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
|
||||
// Taken From Signature :)
|
||||
const settings = definePluginSettings({
|
||||
|
|
@ -31,8 +31,8 @@ export default definePlugin({
|
|||
{
|
||||
find: "#{intl::MESSAGE_FORWARDING_NSFW_NOT_ALLOWED}",
|
||||
replacement: {
|
||||
match: /if\((\i)\.isNSFW\(\)&&.{0,25}\)\)\)/,
|
||||
replace: "if(false)",
|
||||
match: /if\(.*?\)(return.{0,25}#{intl::MESSAGE_FORWARDING_NSFW_NOT_ALLOWED})/,
|
||||
replace: "if(false)$1",
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption,
|
|||
import { EquicordDevs } from "@utils/constants";
|
||||
import { Logger } from "@utils/Logger";
|
||||
import definePlugin from "@utils/types";
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { findStore } from "@webpack";
|
||||
import { DraftType, UploadHandler, UserStore } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
const logger = new Logger("FriendCloud");
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { MessageObject } from "@api/MessageEvents";
|
||||
import { Message } from "discord-types/general";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
|
||||
import Ollama from "./providers/Ollama";
|
||||
import OpenAI from "./providers/OpenAI";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { MessageObject } from "@api/MessageEvents";
|
||||
import { Message } from "discord-types/general";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
|
||||
import { instructions } from "../instructions";
|
||||
import { FurudoSettings } from "../types";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { MessageObject } from "@api/MessageEvents";
|
||||
import { Message } from "discord-types/general";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
|
||||
import { instructions } from "../instructions";
|
||||
import { FurudoSettings } from "../types";
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { MessageStore, SnowflakeUtils } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
import { settings } from "../index";
|
||||
import { Gif } from "../types";
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import ErrorBoundary from "@components/ErrorBoundary";
|
|||
import { EquicordDevs } from "@utils/constants";
|
||||
import { Logger } from "@utils/Logger";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { findByCodeLazy } from "@webpack";
|
||||
import { React, Text } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
import { GitHubReposComponent } from "./components/GitHubReposComponent";
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ import ErrorBoundary from "@components/ErrorBoundary";
|
|||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import { ModalContent, ModalRoot, openModal } from "@utils/modal";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { Forms, React, Tooltip, UserStore } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
import { JSX } from "react";
|
||||
|
||||
type CustomBadge = string | {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/Co
|
|||
import { migratePluginSettings } from "@api/Settings";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import type { Guild } from "@vencord/discord-types";
|
||||
import { EmojiStore, Menu, StickerStore } from "@webpack/common";
|
||||
import type { Guild } from "discord-types/general";
|
||||
import { zipSync } from "fflate";
|
||||
|
||||
const Patch: NavContextMenuPatchCallback = (children, { guild }: { guild: Guild; }) => {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
*/
|
||||
|
||||
import * as DataStore from "@api/DataStore";
|
||||
import { Guild } from "@vencord/discord-types";
|
||||
import { findStoreLazy, proxyLazyWebpack } from "@webpack";
|
||||
import { Flux, FluxDispatcher, GuildStore } from "@webpack/common";
|
||||
import { Guild } from "discord-types/general";
|
||||
|
||||
|
||||
export const HiddenServersStore = proxyLazyWebpack(() => {
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ import {
|
|||
ModalSize,
|
||||
openModal,
|
||||
} from "@utils/modal";
|
||||
import { Guild } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { Button, Forms, IconUtils, Text, useStateFromStores } from "@webpack/common";
|
||||
import { Guild } from "discord-types/general";
|
||||
|
||||
import { HiddenServersStore } from "../HiddenServersStore";
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import {
|
|||
} from "@api/ServerList";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Guild } from "@vencord/discord-types";
|
||||
import { Menu, React, useStateFromStores } from "@webpack/common";
|
||||
import { Guild } from "discord-types/general";
|
||||
|
||||
import hiddenServersButton from "./components/HiddenServersButton";
|
||||
import { HiddenServersStore } from "./HiddenServersStore";
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import { makeDummyUser } from "@components/PluginSettings/PluginModal";
|
||||
import { Channel, Message } from "@vencord/discord-types";
|
||||
import { ChannelStore, lodash, Toasts, UserStore } from "@webpack/common";
|
||||
import { Channel, Message } from "discord-types/general";
|
||||
|
||||
import { Discord, HolyNotes } from "./types";
|
||||
import { deleteCacheFromDataStore, DeleteEntireStore, saveCacheToDataStore } from "./utils";
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ import { EquicordDevs } from "@utils/constants";
|
|||
import { classes } from "@utils/misc";
|
||||
import { openModal } from "@utils/modal";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findByCodeLazy, findByProps, findComponentByCodeLazy } from "@webpack";
|
||||
import { ChannelStore, Menu } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
import { Popover as NoteButtonPopover, Popover } from "./components/icons/NoteButton";
|
||||
import { NoteModal } from "./components/modals/Notebook";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* 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 interface Sticker {
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { RelationshipStore, SelectedChannelStore } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
interface IMessageCreate {
|
||||
type: "MESSAGE_CREATE";
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import { EquicordDevs } from "@utils/constants";
|
|||
import { openUserProfile } from "@utils/discord";
|
||||
import * as Modal from "@utils/modal";
|
||||
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 { Guild, User } from "discord-types/general";
|
||||
|
||||
interface IUserExtra {
|
||||
isOwner?: boolean;
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ import {
|
|||
ModalSize,
|
||||
openModal
|
||||
} from "@utils/modal";
|
||||
import * as t from "@vencord/discord-types";
|
||||
import { Button, FluxDispatcher, TooltipContainer, useCallback, useEffect, useState } from "@webpack/common";
|
||||
import * as t from "@webpack/types";
|
||||
|
||||
import { IconsFinds } from "./names";
|
||||
import { openRawModal } from "./rawModal";
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import "./IconsTab.css";
|
|||
import { SettingsTab, wrapTab } from "@components/VencordSettings/shared";
|
||||
import { Margins } from "@utils/margins";
|
||||
import { classes } from "@utils/misc";
|
||||
import * as t from "@vencord/discord-types";
|
||||
import { Button, Clickable, Forms, React, TextInput, TooltipContainer } from "@webpack/common";
|
||||
import * as t from "@webpack/types";
|
||||
|
||||
import { openIconModal } from "./IconModal";
|
||||
import { getNameByIcon } from "./names";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import * as t from "@webpack/types";
|
||||
import * as t from "@vencord/discord-types";
|
||||
|
||||
// name: pattern
|
||||
export const IconsFinds = {
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ import {
|
|||
ModalSize,
|
||||
openModal
|
||||
} from "@utils/modal";
|
||||
import * as t from "@vencord/discord-types";
|
||||
import { Button, Toasts } from "@webpack/common";
|
||||
import * as t from "@webpack/types";
|
||||
|
||||
import { ModalHeaderTitle } from "./subComponents";
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ import {
|
|||
ModalSize,
|
||||
openModal
|
||||
} from "@utils/modal";
|
||||
import * as t from "@vencord/discord-types";
|
||||
import { Button, Forms, Select, TextInput, useCallback, useEffect, useState } from "@webpack/common";
|
||||
import * as t from "@webpack/types";
|
||||
|
||||
import { ModalHeaderTitle } from "./subComponents";
|
||||
import { convertComponentToHtml, cssColors, iconSizesInPx, saveIcon } from "./utils";
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
*/
|
||||
|
||||
import { saveFile } from "@utils/web";
|
||||
import * as t from "@vencord/discord-types";
|
||||
import { filters, findAll, findByPropsLazy, waitFor } from "@webpack";
|
||||
import { createRoot, React, ReactDOM } from "@webpack/common";
|
||||
import * as t from "@webpack/types";
|
||||
import { createRoot, ReactDOM } from "@webpack/common";
|
||||
export let _cssColors: string[] = [];
|
||||
export type IconsDef = { [k: string]: t.Icon; };
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { ErrorBoundary } from "@components/index";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Channel } from "@vencord/discord-types";
|
||||
import { FluxDispatcher, Menu, React, UserStore } from "@webpack/common";
|
||||
import { Channel } from "discord-types/general";
|
||||
|
||||
const ignoredChannelIds = new Set<string>();
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,10 @@
|
|||
* 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 definePlugin from "@utils/types";
|
||||
import { CommandArgument, CommandContext } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { DraftType, UploadHandler, UploadManager } from "@webpack/common";
|
||||
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 width: number | null = null;
|
||||
let height: number | null = null;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
import { classNameFactory } from "@api/Styles";
|
||||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { ModalCloseButton, ModalContent, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import { GuildMember } from "@vencord/discord-types";
|
||||
import { Forms, Parser } from "@webpack/common";
|
||||
import { GuildMember } from "discord-types/general";
|
||||
|
||||
const cl = classNameFactory("vc-inrole-");
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import { InfoIcon } from "@components/Icons";
|
|||
import { Devs } from "@utils/constants";
|
||||
import { getCurrentChannel, getCurrentGuild } from "@utils/discord";
|
||||
import definePlugin from "@utils/types";
|
||||
import { GuildMember } from "@vencord/discord-types";
|
||||
import { Forms, GuildMemberStore, GuildRoleStore, Menu, Parser } from "@webpack/common";
|
||||
import { GuildMember } from "discord-types/general";
|
||||
|
||||
import { showInRoleModal } from "./RoleMembersModal";
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { VoiceState } from "@vencord/discord-types";
|
||||
import { findByCodeLazy } from "@webpack";
|
||||
import { ChannelStore, PermissionsBits, PermissionStore, SelectedChannelStore, UserStore } from "@webpack/common";
|
||||
import { VoiceState } from "@webpack/types";
|
||||
|
||||
import { getCurrentMedia, settings } from "./utils";
|
||||
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ import { Margins } from "@utils/margins";
|
|||
import { classes } from "@utils/misc";
|
||||
import { useForceUpdater } from "@utils/react";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Message, User } from "@vencord/discord-types";
|
||||
import { findByCodeLazy, findByPropsLazy } from "@webpack";
|
||||
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";
|
||||
|
||||
type IconProps = JSX.IntrinsicElements["svg"];
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ import { EquicordDevs } from "@utils/constants";
|
|||
import { Logger } from "@utils/Logger";
|
||||
import { openModal } from "@utils/modal";
|
||||
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 { Channel } from "discord-types/general";
|
||||
|
||||
import { DependencyModal } from "./DependencyModal";
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
import { definePluginSettings } from "@api/Settings";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Channel, Message } from "@vencord/discord-types";
|
||||
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) {
|
||||
let should = true;
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import { openUserProfile } from "@utils/discord";
|
|||
import { copyWithToast } from "@utils/misc";
|
||||
import { closeAllModals, ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import { LazyComponent } from "@utils/react";
|
||||
import { User } from "@vencord/discord-types";
|
||||
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 { User } from "discord-types/general";
|
||||
|
||||
import { clearMessagesIDB, DBMessageRecord, deleteMessageIDB, deleteMessagesBulkIDB } from "../db";
|
||||
import { settings } from "../index";
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ async function messageDeleteHandler(payload: MessageDeletePayload & { isBulk: bo
|
|||
try {
|
||||
handledMessageIds.add(payload.id);
|
||||
|
||||
// @ts-ignore
|
||||
let message: LoggedMessage | LoggedMessageJSON | null =
|
||||
oldGetMessage?.(payload.channelId, payload.id);
|
||||
if (message == null) {
|
||||
|
|
@ -152,6 +153,7 @@ async function messageUpdateHandler(payload: MessageUpdatePayload) {
|
|||
]
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
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++) {
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* 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 {
|
||||
fileExtension?: string | null;
|
||||
|
|
@ -35,6 +35,14 @@ export interface LoggedMessageJSON extends Omit<LoggedMessage, "timestamp"> {
|
|||
ghostPinged?: boolean;
|
||||
timestamp: string;
|
||||
ourCache?: boolean;
|
||||
channel_id: string;
|
||||
id: string;
|
||||
author: User;
|
||||
flags: number;
|
||||
bot: boolean;
|
||||
mentions: string[];
|
||||
content: string;
|
||||
webhookId: string | undefined;
|
||||
referenced_message: RefrencedMessage;
|
||||
message_reference: RefrencedMessage;
|
||||
}
|
||||
|
|
@ -47,6 +55,14 @@ export interface LoggedMessage extends Message {
|
|||
timestamp: string;
|
||||
content: string;
|
||||
}[];
|
||||
channel_id: string;
|
||||
id: string;
|
||||
author: User;
|
||||
flags: number;
|
||||
bot: boolean;
|
||||
mentions: string[];
|
||||
content: string;
|
||||
webhookId: string | undefined;
|
||||
}
|
||||
|
||||
export interface MessageDeletePayload {
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { MessageStore } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
import { LoggedMessageJSON, RefrencedMessage } from "../types";
|
||||
import { getGuildIdByChannel, isGhostPinged } from "./index";
|
||||
|
|
@ -111,6 +111,6 @@ export function cleanupUserObject(user: User) {
|
|||
avatar: user.avatar,
|
||||
id: user.id,
|
||||
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
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* 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 { LoggedAttachment, LoggedMessage, LoggedMessageJSON } from "../../types";
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import "./style.css";
|
|||
import { FFmpeg } from "@ffmpeg/ffmpeg";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Channel } from "@vencord/discord-types";
|
||||
import { React } from "@webpack/common";
|
||||
import { Channel } from "discord-types/general";
|
||||
|
||||
import { PickerContent, PickerHeader, PickerSidebar, Settings, Wrapper } from "./components";
|
||||
import { getStickerPack, getStickerPackMetas } from "./stickers";
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import { makeRange } from "@components/PluginSettings/components/SettingSliderCo
|
|||
import { Devs } from "@utils/constants";
|
||||
import { sleep } from "@utils/misc";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Message, ReactionEmoji } from "@vencord/discord-types";
|
||||
import { RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common";
|
||||
import { Message, ReactionEmoji } from "discord-types/general";
|
||||
|
||||
interface IMessageCreate {
|
||||
type: "MESSAGE_CREATE";
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { UserStore } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
let user: ModifiedUser | undefined;
|
||||
let lastUserId: string | undefined;
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
const PinIcon = findComponentByCodeLazy("1-.06-.63L6.16");
|
||||
export default definePlugin({
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import "@equicordplugins/_misc/styles.css";
|
|||
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Channel, Message } from "@vencord/discord-types";
|
||||
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> {
|
||||
let deleted = 0;
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import { Devs } from "@utils/constants";
|
|||
import { getCurrentChannel } from "@utils/discord";
|
||||
import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
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 { Message } from "discord-types/general";
|
||||
|
||||
import { QuoteIcon } from "./components";
|
||||
import { canvasToBlob, fetchImageAsBlob, FixUpQuote, wrapText } from "./utils";
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ import { EquicordDevs } from "@utils/constants";
|
|||
import { sendMessage } from "@utils/discord";
|
||||
import { classes } from "@utils/misc";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { ChannelStore, Menu } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
function RepeatMessageIcon({ className }: { className?: string; }) {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { MessageJSON } from "@vencord/discord-types";
|
||||
import { MessageStore, UserStore } from "@webpack/common";
|
||||
import { MessageJSON } from "discord-types/general";
|
||||
|
||||
export const settings = definePluginSettings({
|
||||
alwaysPingOnReply: {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import { DataStore } from "@api/index";
|
|||
import { definePluginSettings } from "@api/Settings";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType, PluginNative } from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { ApplicationAssetUtils, FluxDispatcher, UserStore } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
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)\//, "");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
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) {
|
||||
// you can use this on anything really
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const roleIconClassName = findByPropsLazy("roleIcon", "separator").roleIcon;
|
|||
const RoleIconComponent = findComponentByCodeLazy("#{intl::ROLE_ICON_ALT_TEXT}");
|
||||
import "./styles.css";
|
||||
|
||||
import { User } from "discord-types/general";
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { JSX } from "react";
|
||||
|
||||
import settings from "./settings";
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import { NavContextMenuPatchCallback } from "@api/ContextMenu";
|
|||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Channel, User } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
|
||||
import {
|
||||
ChannelRouter,
|
||||
|
|
@ -22,7 +23,6 @@ import {
|
|||
UserStore,
|
||||
useStateFromStores
|
||||
} from "@webpack/common";
|
||||
import { Channel, User } from "discord-types/general";
|
||||
|
||||
import { SidebarStore } from "./store";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
*/
|
||||
|
||||
import { proxyLazy } from "@utils/lazy";
|
||||
import { Channel, Guild } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { ChannelStore, Flux, FluxDispatcher, GuildStore } from "@webpack/common";
|
||||
import { Channel, Guild } from "discord-types/general";
|
||||
|
||||
// cant destructure, otherwise context is lost
|
||||
const DMChannelHandler = findByPropsLazy("getOrEnsurePrivateChannel");
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import { Flex } from "@components/Flex";
|
|||
import { Margins } from "@utils/margins";
|
||||
import { classes, copyWithToast } from "@utils/misc";
|
||||
import { closeModal, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import { User } from "@vencord/discord-types";
|
||||
import { findComponentByCodeLazy } from "@webpack";
|
||||
import { Button, Clickable, Forms, Text, Tooltip, useEffect, UserUtils, useState } from "@webpack/common";
|
||||
import { User } from "discord-types/general";
|
||||
|
||||
import settings from "../settings";
|
||||
import { clearLoggedSounds, getLoggedSounds } from "../store";
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import { classNameFactory } from "@api/Styles";
|
|||
import { proxyLazy } from "@utils/lazy";
|
||||
import { LazyComponent } from "@utils/react";
|
||||
import { saveFile } from "@utils/web";
|
||||
import type { User } from "@vencord/discord-types";
|
||||
import { findByCode, findByProps, findByPropsLazy } from "@webpack";
|
||||
import type { User } from "discord-types/general";
|
||||
|
||||
import settings from "./settings";
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import { OpenExternalIcon } from "@components/Icons";
|
|||
import { proxyLazy } from "@utils/lazy";
|
||||
import { Margins } from "@utils/margins";
|
||||
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 { User } from "discord-types/general";
|
||||
import { Constructor } from "type-fest";
|
||||
|
||||
import type { Theme, ThemeLikeProps } from "../types";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { ModalProps } from "@utils/modal";
|
||||
import { User } from "discord-types/general";
|
||||
import { User } from "@vencord/discord-types";
|
||||
|
||||
type Author = {
|
||||
github_name?: string;
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import ErrorBoundary from "@components/ErrorBoundary";
|
|||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import { openModal } from "@utils/modal";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Message, User } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
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 { SetTimezoneModal } from "./TimezoneModal";
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { makeRange } from "@components/PluginSettings/components";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Channel, Message, User } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findStore } from "@webpack";
|
||||
import { Button, ChannelStore, GuildRoleStore, NavigationRouter, RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common";
|
||||
import { Channel, Message, User } from "discord-types/general";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import { NotificationData, showNotification } from "./components/Notifications";
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { Parser, useEffect, useState } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
import { languages } from "../misc/languages";
|
||||
import { cl, Translation } from "../misc/types";
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
*/
|
||||
|
||||
import { classNameFactory } from "@api/Styles";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { useState } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
export const conversions = new Map<string, (conv: string) => void>();
|
||||
const cl = classNameFactory("vc-converter-");
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import ErrorBoundary from "@components/ErrorBoundary";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Channel } from "@vencord/discord-types";
|
||||
import { findStoreLazy } from "@webpack";
|
||||
import { ReadStateStore, useStateFromStores } from "@webpack/common";
|
||||
import { Channel } from "discord-types/general";
|
||||
import { JSX } from "react";
|
||||
|
||||
const UserGuildSettingsStore = findStoreLazy("UserGuildSettingsStore");
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { Link } from "@components/Link";
|
||||
import { EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { User } from "discord-types/general";
|
||||
import { User } from "@vencord/discord-types";
|
||||
|
||||
let data = {
|
||||
avatars: {} as Record<string, string>,
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ function getTypeAndChannelId(
|
|||
function playSample(tempSettings: any, type: string) {
|
||||
const s = Object.assign({}, settings.plain, tempSettings);
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const myGuildId = SelectedGuildStore.getGuildId();
|
||||
const myGuildId = SelectedGuildStore.getGuildId()!;
|
||||
|
||||
speak(
|
||||
formatText(
|
||||
|
|
@ -312,7 +312,7 @@ export default definePlugin({
|
|||
settings,
|
||||
flux: {
|
||||
VOICE_STATE_UPDATES({ voiceStates }: { voiceStates: VoiceState[]; }) {
|
||||
const myGuildId = SelectedGuildStore.getGuildId();
|
||||
const myGuildId = SelectedGuildStore.getGuildId()!;
|
||||
const myChanId = SelectedChannelStore.getVoiceChannelId();
|
||||
const myId = UserStore.getCurrentUser().id;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,9 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { Devs } from "@utils/constants";
|
||||
import { isTruthy } from "@utils/guards";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Channel, FluxStore } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findStoreLazy } from "@webpack";
|
||||
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 GuildMemberCountStore = findStoreLazy("GuildMemberCountStore") as FluxStore & { getMemberCount(guildId: string): number | null; };
|
||||
|
|
@ -213,7 +212,7 @@ function totalFriendCount(): number {
|
|||
|
||||
function memberCount(): string {
|
||||
const channelId = SelectedChannelStore.getChannelId();
|
||||
const guildId = SelectedGuildStore.getGuildId();
|
||||
const guildId = SelectedGuildStore.getGuildId()!;
|
||||
const { groups } = ChannelMemberStore.getProps(guildId, channelId);
|
||||
const total = GuildMemberCountStore.getMemberCount(guildId);
|
||||
|
||||
|
|
@ -265,7 +264,7 @@ async function createActivity(): Promise<Activity | undefined> {
|
|||
|
||||
|
||||
const channelId = SelectedChannelStore.getChannelId();
|
||||
const guildId = SelectedGuildStore.getGuildId();
|
||||
const guildId = SelectedGuildStore.getGuildId()!;
|
||||
const voiceId = SelectedChannelStore.getVoiceChannelId();
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
if (userAvatarAsSmallImage) imageSmall = currentUser.getAvatarURL(undefined, undefined, true) || chino;
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ import {
|
|||
openModal,
|
||||
} from "@utils/modal";
|
||||
import definePlugin from "@utils/types";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { Forms, Menu, Text } from "@webpack/common";
|
||||
import { Message } from "discord-types/general";
|
||||
|
||||
type CustomMessage = Message & {
|
||||
editHistory?: any;
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
import "./VoiceChannelLogEntryComponent.css";
|
||||
|
||||
import { classes } from "@utils/misc";
|
||||
import { Channel } from "@vencord/discord-types";
|
||||
import { React, Timestamp, Tooltip, UserStore } from "@webpack/common";
|
||||
import { Channel } from "discord-types/general";
|
||||
import { Util } from "Vencord";
|
||||
|
||||
import { cl } from "..";
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
*/
|
||||
|
||||
import { classes } from "@utils/misc";
|
||||
import { Channel } from "@vencord/discord-types";
|
||||
import { React } from "@webpack/common";
|
||||
import { Channel } from "discord-types/general";
|
||||
|
||||
import { cl } from "..";
|
||||
import { VoiceChannelLogEntry } from "../logs";
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
import { classes } from "@utils/misc";
|
||||
import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import { Channel } from "@vencord/discord-types";
|
||||
import { findStoreLazy } from "@webpack";
|
||||
import { React, ScrollerThin, Text } from "@webpack/common";
|
||||
import { Channel } from "discord-types/general";
|
||||
|
||||
import { cl } from "..";
|
||||
import { getVcLogs, vcLogSubscribe } from "../logs";
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { classNameFactory } from "@api/Styles";
|
||||
import { Devs, EquicordDevs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { Message, User } from "@vencord/discord-types";
|
||||
import { findByCodeLazy } from "@webpack";
|
||||
import { FluxDispatcher, Menu, MessageActions, MessageStore, RelationshipStore, SelectedChannelStore, UserStore } from "@webpack/common";
|
||||
import { Message, User } from "discord-types/general";
|
||||
|
||||
import { openVoiceChannelLog } from "./components/VoiceChannelLogModal";
|
||||
import { addLogEntry } from "./logs";
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import { definePluginSettings } from "@api/Settings";
|
|||
import { makeRange } from "@components/PluginSettings/components";
|
||||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import type { Channel } from "@vencord/discord-types";
|
||||
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[]> {
|
||||
const results: T[] = [];
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue