refactor discord types into separate npm package (#3520)

Co-authored-by: V <vendicated@riseup.net>
Co-authored-by: sadan <117494111+sadan4@users.noreply.github.com>
Co-authored-by: ezzud <contact@ezzud.fr>
This commit is contained in:
V 2025-07-10 00:38:39 +02:00 committed by GitHub
parent c55833d95f
commit dc9064326b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
149 changed files with 1561 additions and 751 deletions

View file

@ -25,16 +25,12 @@ import { Devs } from "@utils/constants";
import { Margins } from "@utils/margins";
import { classes, copyWithToast } from "@utils/misc";
import definePlugin, { OptionType } from "@utils/types";
import { User } from "@vencord/discord-types";
import { findComponentByCodeLazy } from "@webpack";
import { Button, ColorPicker, Flex, Forms, React, Text, UserProfileStore, UserStore, useState } from "@webpack/common";
import { User } from "discord-types/general";
import { ReactElement } from "react";
import virtualMerge from "virtual-merge";
interface UserProfile extends User {
themeColors?: Array<number>;
}
interface Colors {
primary: number;
accent: number;
@ -220,7 +216,7 @@ export default definePlugin({
</Forms.FormSection>);
},
settings,
colorDecodeHook(user: UserProfile) {
colorDecodeHook(user: User) {
if (user) {
// don't replace colors if already set with nitro
if (settings.store.nitroFirst && user.themeColors) return user;