fix: apply reported changes

This commit is contained in:
ryan-0324 2024-08-07 23:58:22 -04:00
parent 1cd4473edc
commit daaf205637
19 changed files with 216 additions and 183 deletions

View file

@ -68,7 +68,7 @@
"highlight.js": "11.8.0",
"html-minifier-terser": "^7.2.0",
"moment": "2.22.2",
"puppeteer-core": "^22.15.0",
"puppeteer-core": "^23.0.1",
"standalone-electron-types": "^1.0.0",
"stylelint": "^16.8.1",
"stylelint-config-standard": "^36.0.1",
@ -76,11 +76,11 @@
"tsx": "^4.16.5",
"type-fest": "^4.23.0",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.0",
"typescript-transform-paths": "^3.4.7",
"typescript-eslint": "^8.0.1",
"typescript-transform-paths": "^3.4.10",
"zip-local": "^0.3.5"
},
"packageManager": "pnpm@9.6.0",
"packageManager": "pnpm@9.7.0",
"pnpm": {
"patchedDependencies": {
"@stylistic/eslint-plugin-js@2.6.1": "patches/@stylistic__eslint-plugin-js@2.6.1.patch",

View file

@ -33,7 +33,7 @@
"@stylistic/eslint-plugin": "^2.6.1",
"@types/node": "^20.14.14",
"@types/semver": "^7.5.8",
"@typescript-eslint/typescript-estree": "^8.0.0",
"@typescript-eslint/typescript-estree": "^8.0.1",
"eslint": "^9.8.0",
"eslint-plugin-check-file": "^2.8.0",
"eslint-plugin-import-x": "^3.1.0",
@ -41,10 +41,10 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unicorn": "^55.0.0",
"eslint-plugin-unused-imports": "^4.0.1",
"puppeteer-core": "^22.15.0",
"puppeteer-core": "^23.0.1",
"semver": "^7.6.3",
"tsx": "^4.16.5",
"typescript": "^5.5.4",
"typescript-eslint": "^8.0.0"
"typescript-eslint": "^8.0.1"
}
}

View file

@ -101,8 +101,8 @@ export default {
type: "enum",
find() {
let key: string;
return new Promise<Record<string, unknown>>(res => {
this.Webpack.waitFor((exps: any) => {
return new Promise<CR.EnumMembers>(res => {
this.Webpack.waitFor(exps => {
for (const k in exps) {
try {
if (typeof exps[k]?.STRANGER_DANGER === "number") {
@ -130,7 +130,7 @@ export default {
*/
},
"./general/channels/ForumChannelRecord.ts": {
ForumChannelRecordBase: {
ForumChannelRecord: {
type: "class",
find() {
const castChannelRecord = this.Webpack.findByCode(".GUILD_TEXT]", "return(");
@ -338,8 +338,8 @@ export default {
type: "enum",
find() {
let key: string;
return new Promise<Record<string, unknown>>(res => {
this.Webpack.waitFor((exps: any) => {
return new Promise<CR.EnumMembers>(res => {
this.Webpack.waitFor(exps => {
for (const k in exps) {
try {
if (exps[k]?.ROLE === "role") {

View file

@ -5,9 +5,8 @@
*/
import type { DepGraph } from "dependency-graph";
import type { UnionToIntersection } from "type-fest";
import type { IsAny, Nullish } from "../internal";
import type { IsAny, Nullish, UnionToIntersection } from "../internal";
import type { ExtractAction, FluxAction, FluxActionHandler, FluxActionType } from "./fluxActions";
import type { FluxDispatchBand } from "./FluxDispatcher";
@ -55,7 +54,7 @@ export type FluxActionHandlerMap<Action extends FluxAction = FluxAction>
= UnionToIntersection<
Action extends unknown
? PropertyKey extends keyof Action
? IsAny<Action[string]> & IsAny<Action[number]> & IsAny<Action[symbol]> extends unknown
? unknown extends IsAny<Action[string]> & IsAny<Action[number]> & IsAny<Action[symbol]>
? { [ActionType in Action["type"]]: (action: any) => void; }
: { [ActionType in Action["type"]]: (action: Action & { type: ActionType; }) => void; }
: { [ActionType in Action["type"]]: (action: Action & { type: ActionType; }) => void; }

File diff suppressed because one or more lines are too long

View file

@ -9,7 +9,7 @@ import type { SnakeCasedProperties } from "type-fest";
import type { Nullish, Optional } from "../../internal";
import type { PermissionOverwriteMap } from "../Permissions";
import type { AvatarDecorationData, UserClanData, UserFlags } from "../UserRecord";
import type { ForumChannelRecord, GuildForumChannelRecord, GuildMediaChannelRecord } from "./ForumChannelRecord";
import type { ForumChannelRecord } from "./ForumChannelRecord";
import type { GuildCategoryChannelRecord, GuildDirectoryChannelRecord, GuildTextualChannelRecord } from "./GuildTextualChannelRecord";
import type { GuildStageVoiceChannelRecord, GuildVocalChannelRecord, GuildVoiceChannelRecord } from "./GuildVocalChannelRecord";
import type { DMChannelRecord, GroupDMChannelRecord, PrivateChannelRecord } from "./PrivateChannelRecord";
@ -21,7 +21,7 @@ export type GuildChannelRecord = GuildTextualChannelRecord | GuildVocalChannelRe
export type GuildSelectableChannelRecord = Exclude<GuildChannelRecord, GuildCategoryChannelRecord | GuildVocalChannelRecord>;
type ChannelRecordOwnPropertyKeys = "application_id" | "appliedTags" | "availableTags" | "bitrate_" | "blockedUserWarningDismissed" | "defaultAutoArchiveDuration" | "defaultForumLayout" | "defaultReactionEmoji" | "defaultSortOrder" | "defaultThreadRateLimitPerUser" | "flags_" | "guild_id" | "icon" | "iconEmoji" | "id" | "isMessageRequest" | "isMessageRequestTimestamp" | "isSpam" | "lastMessageId" | "lastPinTimestamp" | "member" | "memberCount" | "memberIdsPreview" | "memberListId" | "messageCount" | "name" | "nicks" | "nsfw_" | "originChannelId" | "ownerId" | "parentChannelThreadType" | "parent_id" | "permissionOverwrites_" | "position_" | "rateLimitPerUser_" | "rawRecipients" | "recipients" | "rtcRegion" | "safetyWarnings" | "template" | "themeColor" | "threadMetadata" | "topic_" | "totalMessageSent" | "type" | "userLimit_" | "version" | "videoQualityMode";
type ChannelRecordOwnPropertyKeys = "application_id" | "appliedTags" | "availableTags" | "bitrate_" | "blockedUserWarningDismissed" | "defaultAutoArchiveDuration" | "defaultForumLayout" | "defaultReactionEmoji" | "defaultSortOrder" | "defaultThreadRateLimitPerUser" | "flags_" | "guild_id" | "icon" | "iconEmoji" | "id" | "isMessageRequest" | "isMessageRequestTimestamp" | "isSpam" | "lastMessageId" | "lastPinTimestamp" | "linkedLobby" | "member" | "memberCount" | "memberIdsPreview" | "memberListId" | "messageCount" | "name" | "nicks" | "nsfw_" | "originChannelId" | "ownerId" | "parentChannelThreadType" | "parent_id" | "permissionOverwrites_" | "position_" | "rateLimitPerUser_" | "rawRecipients" | "recipients" | "rtcRegion" | "safetyWarnings" | "template" | "themeColor" | "threadMetadata" | "topic_" | "totalMessageSent" | "type" | "userLimit_" | "version" | "videoQualityMode";
export type ChannelRecordOwnProperties<Channel extends ChannelRecordBase> = Pick<Channel, ChannelRecordOwnPropertyKeys>;
@ -43,7 +43,7 @@ export declare abstract class ChannelRecordBase extends ChannelRecordProperties
isCategory(): this is GuildCategoryChannelRecord;
isDirectory(): this is GuildDirectoryChannelRecord;
isDM(): this is DMChannelRecord;
isForumChannel(): this is GuildForumChannelRecord;
isForumChannel(): this is ForumChannelRecord<ChannelType.GUILD_FORUM>;
isForumLikeChannel(): this is ForumChannelRecord;
isForumPost(): boolean;
isGroupDM(): this is GroupDMChannelRecord;
@ -54,7 +54,7 @@ export declare abstract class ChannelRecordBase extends ChannelRecordProperties
isListenModeCapable(): this is GuildStageVoiceChannelRecord;
isLockedThread(): boolean;
isManaged(): boolean;
isMediaChannel(): this is GuildMediaChannelRecord;
isMediaChannel(): this is ForumChannelRecord<ChannelType.GUILD_MEDIA>;
isMediaPost(): boolean;
/** This method is functionally the same as {@link isGroupDM}. */
isMultiUserDM(): this is GroupDMChannelRecord;
@ -106,6 +106,8 @@ export declare abstract class ChannelRecordProperties {
isSpam?: boolean | undefined;
lastMessageId: string | Nullish;
lastPinTimestamp: string | Nullish;
/** @todo */
linkedLobby?: any;
member?: ThreadMember | undefined;
memberCount?: number | undefined;
memberIdsPreview?: string[] | undefined;

View file

@ -5,25 +5,20 @@
*/
import type { Defined, Nullish, OmitOptional, Optional, PartialOnUndefined } from "../../internal";
import type { ChannelProperties, ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
import type { ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
export type ForumChannelRecord = GuildForumChannelRecord | GuildMediaChannelRecord;
export type ForumChannelProperties<Channel extends ForumChannelRecordBase> = ChannelProperties & Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<Channel>>>, Nullish, ("availableTags" | "permissionOverwrites_") & keyof PartialOnUndefined<ChannelRecordOwnProperties<Channel>>>;
export type ForumChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<ForumChannelRecord>>>, Nullish, "availableTags" | "guild_id" | "name" | "permissionOverwrites_">;
type ForumChannelType = ChannelType.GUILD_FORUM | ChannelType.GUILD_MEDIA;
export declare abstract class ForumChannelRecordBase extends ChannelRecordBase {
constructor(channelProperties: ForumChannelProperties<ForumChannelRecordBase>);
export declare class ForumChannelRecord<ChannelType extends ForumChannelType = ForumChannelType> extends ChannelRecordBase {
constructor(channelProperties: ForumChannelProperties);
static fromServer<Type extends ForumChannelType>(
/** @todo */
channelFromServer: { type: Type; } & Record<string, any>,
guildId?: string | Nullish
): {
[ChannelType.GUILD_FORUM]: GuildForumChannelRecord;
[ChannelType.GUILD_MEDIA]: GuildMediaChannelRecord;
}[Type];
): ForumChannelRecord<Type>;
application_id?: undefined;
appliedTags?: undefined;
@ -43,6 +38,7 @@ export declare abstract class ForumChannelRecordBase extends ChannelRecordBase {
isSpam?: undefined;
lastMessageId: ChannelRecordBase["lastMessageId"];
lastPinTimestamp: ChannelRecordBase["lastPinTimestamp"];
linkedLobby?: undefined;
member?: undefined;
memberCount?: undefined;
memberIdsPreview?: undefined;
@ -67,21 +63,9 @@ export declare abstract class ForumChannelRecordBase extends ChannelRecordBase {
threadMetadata?: undefined;
topic_: ChannelRecordBase["topic_"];
totalMessageSent?: undefined;
type: ForumChannelType;
type: ChannelType;
userLimit_?: undefined;
version: ChannelRecordBase["version"];
videoQualityMode?: undefined;
voiceBackgroundDisplay?: undefined;
}
export declare class GuildForumChannelRecord extends ForumChannelRecordBase {
constructor(channelProperties: ForumChannelProperties<GuildForumChannelRecord>);
type: ChannelType.GUILD_FORUM;
}
export declare class GuildMediaChannelRecord extends ForumChannelRecordBase {
constructor(channelProperties: ForumChannelProperties<GuildMediaChannelRecord>);
type: ChannelType.GUILD_MEDIA;
}

View file

@ -5,16 +5,16 @@
*/
import type { Defined, Nullish, OmitOptional, Optional, PartialOnUndefined } from "../../internal";
import type { ChannelProperties, ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
import type { ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
export type GuildTextualChannelRecord = GuildTextChannelRecord | GuildCategoryChannelRecord | GuildAnnouncementChannelRecord | GuildStoreChannelRecord | GuildDirectoryChannelRecord;
export type GuildTextualChannelProperties<Channel extends GuildTextualChannelRecordBase> = ChannelProperties & Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<Channel>>>, Nullish, "permissionOverwrites_" & keyof PartialOnUndefined<ChannelRecordOwnProperties<Channel>>>;
export type GuildTextualChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GuildTextualChannelRecordBase>>>, Nullish, "guild_id" | "name" | "permissionOverwrites_" | "type">;
type GuildTextualChannelType = ChannelType.GUILD_TEXT | ChannelType.GUILD_CATEGORY | ChannelType.GUILD_ANNOUNCEMENT | ChannelType.GUILD_STORE | ChannelType.GUILD_DIRECTORY;
export declare abstract class GuildTextualChannelRecordBase extends ChannelRecordBase {
constructor(channelProperties: GuildTextualChannelProperties<GuildTextualChannelRecordBase>);
constructor(channelProperties: GuildTextualChannelProperties);
static fromServer<Type extends GuildTextualChannelType | Nullish = undefined>(
/** @todo */
@ -46,6 +46,8 @@ export declare abstract class GuildTextualChannelRecordBase extends ChannelRecor
isSpam?: undefined;
lastMessageId: ChannelRecordBase["lastMessageId"];
lastPinTimestamp: ChannelRecordBase["lastPinTimestamp"];
/** @todo */
linkedLobby: ChannelRecordBase["linkedLobby"];
member?: undefined;
memberCount?: undefined;
memberIdsPreview?: undefined;
@ -77,14 +79,18 @@ export declare abstract class GuildTextualChannelRecordBase extends ChannelRecor
voiceBackgroundDisplay?: undefined;
}
export type GuildTextChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GuildTextChannelRecord>>>, Nullish, "guild_id" | "name" | "permissionOverwrites_" | "type">;
export declare class GuildTextChannelRecord extends GuildTextualChannelRecordBase {
constructor(channelProperties: GuildTextualChannelProperties<GuildTextChannelRecord>);
constructor(channelProperties: GuildTextChannelProperties);
type: ChannelType.GUILD_TEXT;
}
export type GuildCategoryChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GuildCategoryChannelRecord>>>, Nullish, "guild_id" | "name" | "permissionOverwrites_">;
export declare class GuildCategoryChannelRecord extends GuildTextualChannelRecordBase {
constructor(channelProperties: GuildTextualChannelProperties<GuildCategoryChannelRecord>);
constructor(channelProperties: GuildCategoryChannelProperties);
defaultAutoArchiveDuration: undefined;
defaultThreadRateLimitPerUser: undefined;
@ -97,20 +103,26 @@ export declare class GuildCategoryChannelRecord extends GuildTextualChannelRecor
type: ChannelType.GUILD_CATEGORY;
}
export type GuildAnnouncementChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GuildAnnouncementChannelRecord>>>, Nullish, "guild_id" | "name" | "permissionOverwrites_">;
export declare class GuildAnnouncementChannelRecord extends GuildTextualChannelRecordBase {
constructor(channelProperties: GuildTextualChannelProperties<GuildAnnouncementChannelRecord>);
constructor(channelProperties: GuildAnnouncementChannelProperties);
type: ChannelType.GUILD_ANNOUNCEMENT;
}
export type GuildStoreChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GuildStoreChannelRecord>>>, Nullish, "guild_id" | "name" | "permissionOverwrites_">;
export declare class GuildStoreChannelRecord extends GuildTextualChannelRecordBase {
constructor(channelProperties: GuildTextualChannelProperties<GuildAnnouncementChannelRecord>);
constructor(channelProperties: GuildStoreChannelProperties);
type: ChannelType.GUILD_STORE;
}
export type GuildDirectoryChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GuildDirectoryChannelRecord>>>, Nullish, "guild_id" | "name" | "permissionOverwrites_">;
export declare class GuildDirectoryChannelRecord extends GuildTextualChannelRecordBase {
constructor(channelProperties: GuildTextualChannelProperties<GuildDirectoryChannelRecord>);
constructor(channelProperties: GuildDirectoryChannelProperties);
type: ChannelType.GUILD_DIRECTORY;
}

View file

@ -5,16 +5,16 @@
*/
import type { Defined, Nullish, OmitOptional, Optional, PartialOnUndefined } from "../../internal";
import type { ChannelProperties, ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
import type { ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
export type GuildVocalChannelRecord = GuildVoiceChannelRecord | GuildStageVoiceChannelRecord;
export type GuildVocalChannelProperties<Channel extends GuildVocalChannelRecordBase> = ChannelProperties & Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<Channel>>>, Nullish, "permissionOverwrites_" & keyof PartialOnUndefined<ChannelRecordOwnProperties<Channel>>>;
export type GuildVocalChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GuildVocalChannelRecordBase>>>, Nullish, "guild_id" | "name" | "permissionOverwrites_">;
type GuildVocalChannelType = ChannelType.GUILD_VOICE | ChannelType.GUILD_STAGE_VOICE;
export declare abstract class GuildVocalChannelRecordBase extends ChannelRecordBase {
constructor(channelProperties: GuildVocalChannelProperties<GuildVocalChannelRecordBase>);
constructor(channelProperties: GuildVocalChannelProperties);
static fromServer<Type extends GuildVocalChannelType | Nullish = undefined>(
/** @todo */
@ -43,6 +43,7 @@ export declare abstract class GuildVocalChannelRecordBase extends ChannelRecordB
isSpam?: undefined;
lastMessageId: ChannelRecordBase["lastMessageId"];
lastPinTimestamp: undefined;
linkedLobby?: undefined;
member?: undefined;
memberCount?: undefined;
memberIdsPreview?: undefined;
@ -75,14 +76,18 @@ export declare abstract class GuildVocalChannelRecordBase extends ChannelRecordB
voiceBackgroundDisplay: Defined<ChannelRecordBase["voiceBackgroundDisplay"]>;
}
export type GuildVoiceChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GuildVoiceChannelRecord>>>, Nullish, "guild_id" | "name" | "permissionOverwrites_">;
export declare class GuildVoiceChannelRecord extends GuildVocalChannelRecordBase {
constructor(channelProperties: GuildVocalChannelProperties<GuildVoiceChannelRecord>);
constructor(channelProperties: GuildVoiceChannelProperties);
type: ChannelType.GUILD_VOICE;
}
export type GuildStageVoiceChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GuildStageVoiceChannelRecord>>>, Nullish, "guild_id" | "name" | "permissionOverwrites_">;
export declare class GuildStageVoiceChannelRecord extends GuildVocalChannelRecordBase {
constructor(channelProperties: GuildVocalChannelProperties<GuildStageVoiceChannelRecord>);
constructor(channelProperties: GuildStageVoiceChannelProperties);
type: ChannelType.GUILD_STAGE_VOICE;
}

View file

@ -5,17 +5,17 @@
*/
import type { Defined, Nullish, OmitOptional, Optional, PartialOnUndefined } from "../../internal";
import type { ChannelProperties, ChannelRecipient, ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
import type { ChannelRecipient, ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
export type PrivateChannelRecord = DMChannelRecord | GroupDMChannelRecord;
export type PrivateChannelProperties<Channel extends PrivateChannelRecordBase> = ChannelProperties & Omit<Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<Channel>>>, Nullish, "safetyWarnings" & keyof PartialOnUndefined<ChannelRecordOwnProperties<Channel>>>, "rawRecipients" | "recipients">
& { rawRecipients?: Readonly<Channel["rawRecipients"]> | Nullish; recipients?: Readonly<Channel["recipients"]> | Nullish; };
export type PrivateChannelProperties = Omit<Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<PrivateChannelRecordBase>>>, Nullish, "guild_id" | "name" | "safetyWarnings">, "rawRecipients" | "recipients">
& { rawRecipients?: Readonly<PrivateChannelRecordBase["rawRecipients"]> | Nullish; recipients?: Readonly<PrivateChannelRecordBase["recipients"]> | Nullish; };
type PrivateChannelType = ChannelType.DM | ChannelType.GROUP_DM;
export declare abstract class PrivateChannelRecordBase extends ChannelRecordBase {
constructor(channelProperties: PrivateChannelProperties<PrivateChannelRecordBase>);
constructor(channelProperties: PrivateChannelProperties);
static fromServer<Type extends PrivateChannelType | Nullish = undefined>(
/** @todo */
@ -49,6 +49,7 @@ export declare abstract class PrivateChannelRecordBase extends ChannelRecordBase
isSpam: Defined<ChannelRecordBase["isSpam"]>;
lastMessageId: ChannelRecordBase["lastMessageId"];
lastPinTimestamp: ChannelRecordBase["lastPinTimestamp"];
linkedLobby?: undefined;
member?: undefined;
memberCount?: undefined;
memberIdsPreview?: undefined;
@ -79,8 +80,11 @@ export declare abstract class PrivateChannelRecordBase extends ChannelRecordBase
voiceBackgroundDisplay?: undefined;
}
export type DMChannelProperties = Omit<Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<DMChannelRecord>>>, Nullish, "guild_id" | "name" | "safetyWarnings">, "rawRecipients" | "recipients">
& { rawRecipients?: Readonly<DMChannelRecord["rawRecipients"]> | Nullish; recipients?: Readonly<DMChannelRecord["recipients"]> | Nullish; };
export declare class DMChannelRecord extends PrivateChannelRecordBase {
constructor(channelProperties: PrivateChannelProperties<DMChannelRecord>);
constructor(channelProperties: DMChannelProperties);
application_id: undefined;
icon: undefined;
@ -89,8 +93,11 @@ export declare class DMChannelRecord extends PrivateChannelRecordBase {
type: ChannelType.DM;
}
export type GroupDMChannelProperties = Omit<Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<GroupDMChannelRecord>>>, Nullish, "guild_id" | "name" | "safetyWarnings">, "rawRecipients" | "recipients">
& { rawRecipients?: Readonly<GroupDMChannelRecord["rawRecipients"]> | Nullish; recipients?: Readonly<GroupDMChannelRecord["recipients"]> | Nullish; };
export declare class GroupDMChannelRecord extends PrivateChannelRecordBase {
constructor(channelProperties: PrivateChannelProperties<GroupDMChannelRecord>);
constructor(channelProperties: GroupDMChannelProperties);
isMessageRequest: undefined;
isMessageRequestTimestamp: undefined;

View file

@ -5,9 +5,9 @@
*/
import type { Defined, Nullish, OmitOptional, Optional, PartialOnUndefined } from "../../internal";
import type { ChannelProperties, ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
import type { ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
export type ThreadChannelProperties = ChannelProperties & Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<ThreadChannelRecord>>>, Nullish, "appliedTags">;
export type ThreadChannelProperties = Optional<PartialOnUndefined<OmitOptional<ChannelRecordOwnProperties<ThreadChannelRecord>>>, Nullish, "appliedTags" | "guild_id" | "name">;
type ThreadChannelType = ChannelType.ANNOUNCEMENT_THREAD | ChannelType.PUBLIC_THREAD | ChannelType.PRIVATE_THREAD;
@ -38,6 +38,7 @@ export declare class ThreadChannelRecord<ChannelType extends ThreadChannelType =
isSpam?: undefined;
lastMessageId: ChannelRecordBase["lastMessageId"];
lastPinTimestamp: ChannelRecordBase["lastMessageId"];
linkedLobby?: undefined;
member: ChannelRecordBase["member"];
memberCount: Defined<ChannelRecordBase["memberCount"]>;
memberIdsPreview: Defined<ChannelRecordBase["memberIdsPreview"]>;

View file

@ -4,10 +4,10 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import type { Defined, Nullish } from "../../internal";
import type { ChannelProperties, ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
import type { Defined, Nullish, Optional } from "../../internal";
import type { ChannelRecordBase, ChannelRecordOwnProperties, ChannelType } from "./ChannelRecord";
export type UnknownChannelProperties = ChannelProperties & ChannelRecordOwnProperties<UnknownChannelRecord>;
export type UnknownChannelProperties = Optional<ChannelRecordOwnProperties<UnknownChannelRecord>, Nullish, "guild_id" | "name">;
export declare class UnknownChannelRecord extends ChannelRecordBase {
constructor(channelProperties: UnknownChannelProperties);
@ -36,6 +36,7 @@ export declare class UnknownChannelRecord extends ChannelRecordBase {
isSpam: ChannelRecordBase["isSpam"];
lastMessageId: ChannelRecordBase["lastMessageId"];
lastPinTimestamp: ChannelRecordBase["lastPinTimestamp"];
linkedLobby: ChannelRecordBase["linkedLobby"];
member: ChannelRecordBase["member"];
memberCount: ChannelRecordBase["memberCount"];
memberIdsPreview: ChannelRecordBase["memberIdsPreview"];

View file

@ -7,16 +7,11 @@
import type MessageFormat from "intl-messageformat";
import type { ReactElement, ReactNode } from "react";
import type { State } from "simple-markdown";
import type { ValueOf } from "type-fest";
import type { Stringable } from "../../internal";
type HookValue = (result: ReactNode, key: State["key"]) => ReactNode;
type GenericValue = Stringable | HookValue;
type GenericArgs = Record<string, GenericValue> | readonly [stringableArgs: string, hookArgs: string] | string;
import type { IsAny, OmitOptional, Stringable, UnionToIntersection } from "../../internal";
export declare class FormattedMessage<
Args extends GenericArgs = string,
Args extends GenericArgs = never,
Markdown extends boolean | undefined = boolean
> {
/**
@ -35,48 +30,60 @@ export declare class FormattedMessage<
* @throws {RangeError | TypeError}
* @see {@link format}
*/
astFormat(...values: FormatValues<Args>): ASTNode;
astFormat(...args: FormatArgs<Args>): ASTNode;
/**
* @throws {RangeError} Values provided to arguments with type date or time must be valid time values.
* @throws {TypeError} Values provided to arguments with type plural, select, or selectordinal must match one of their matches.
*/
format(...values: FormatValues<Args>): Markdown extends true
format(...args: FormatArgs<Args>): Markdown extends true
? (string | ReactElement)[]
: string;
getContext(values: ContextValues<Args>): [
{ [Key in keyof ContextValues<Args>]: ContextValues<Args>[Key] | number; },
Record<number, ValueOf<ContextValues<Args>>>
{ [Key in keyof typeof values]: typeof values[Key] | number; },
Record<number, typeof values[keyof typeof values]>
];
/**
* @throws {RangeError | TypeError}
* @see {@link format}
*/
plainFormat(...values: FormatValues<Args>): string;
plainFormat(...args: FormatArgs<Args>): string;
hasMarkdown: Markdown;
intlMessage: MessageFormat;
message: string;
}
type FormatValues<Args extends GenericArgs>
= [Args] extends [readonly [never, never]]
? []
: [Args] extends [string]
? [Args] extends [`${infer _}`]
? [values: Record<Args, Stringable>]
: [values?: Record<string, GenericValue>]
: [Args] extends [readonly [string, string]]
? [values: Record<Args[0], Stringable> & Record<Args[1], HookValue>]
: [values: Args];
type GenericArgs = RecordArgs | TupleArgs | string;
type RecordArgs = Record<string, GenericValue>;
type TupleArgs = readonly [stringableArgs: string, hookArgs: string];
type GenericValue = Stringable | HookValue;
type HookValue = (result: ReactNode, key: State["key"]) => ReactNode;
type FormatArgs<Args extends GenericArgs>
= unknown extends IsAny<Args>
? [values?: RecordArgs]
: [Args] extends [never]
? []
: keyof FormatValues<Args> extends never
? []
: [values: FormatValues<Args>];
type FormatValues<Args extends GenericArgs> = UnionToIntersection<MessageValues<Args>>;
type ContextValues<Args extends GenericArgs>
= [Args] extends [string]
? [Args] extends [`${infer _}`]
? Record<Args, Stringable>
: Record<string, GenericValue>
: [Args] extends [readonly [string, string]]
= unknown extends IsAny<Args>
? RecordArgs
: [Args] extends [never]
? {}
: MessageValues<Args>;
type MessageValues<Args extends GenericArgs>
= Args extends string
? Record<string extends Args ? never : Args, Stringable>
: Args extends readonly [string, string]
? Record<Args[0], Stringable> & Record<Args[1], HookValue>
: Args;
: OmitOptional<Args>;
/** @todo Add types for every type of ASTNode. */
export interface ASTNode<Type extends ASTNodeType = ASTNodeType> extends Record<string, any> {

File diff suppressed because one or more lines are too long

View file

@ -22,8 +22,14 @@ export type IsAny<T> = 0 extends 1 & T ? unknown : never;
export type Nullish = null | undefined;
/** @internal */
export type OmitOptional<T>
= { [Key in keyof T as T extends Record<Key, T[Key]> ? Key : never]: T[Key]; };
export type OmitOptional<T> = {
[Key in keyof T as {} extends Record<Key, unknown>
? never
: T extends Record<Key, unknown>
? Key
: never
]: T[Key];
};
/** @internal */
export type Optional<T, Value = undefined, Keys extends keyof T = keyof T, ExcludeKeys = false>
@ -36,11 +42,10 @@ export type OptionalTuple<T extends readonly unknown[], Value = undefined>
= { [Key in keyof T]?: T[Key] | Value; };
/** @internal */
export type PartialOnUndefined<T>
= { [Key in keyof T as undefined extends T[Key] ? never : Key]: T[Key]; }
& { [Key in keyof T as undefined extends T[Key] ? Key : never]?: T[Key]; };
export type PartialOnUndefined<T> = Partial<T>
& { [Key in keyof T as undefined extends T[Key] ? never : Key]: T[Key]; };
type StringablePrimitive = string | bigint | number | boolean | null | undefined;
type StringablePrimitive = string | bigint | number | boolean | Nullish;
/** @internal */
export type Stringable
@ -50,3 +55,12 @@ export type Stringable
/** @internal */
export type StringProperties<T> = { [Key in Exclude<keyof T, symbol>]: T[Key]; };
/** @internal */
export type UnionToIntersection<Union> = (
Union extends unknown
? (arg: Union) => unknown
: never
) extends ((arg: infer Intersection) => unknown)
? Intersection
: never;

View file

@ -123,7 +123,7 @@ importers:
version: 12.1.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
eslint-plugin-unused-imports:
specifier: ^4.0.1
version: 4.0.1(@typescript-eslint/eslint-plugin@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
version: 4.0.1(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
highlight.js:
specifier: 11.8.0
version: 11.8.0
@ -134,8 +134,8 @@ importers:
specifier: 2.22.2
version: 2.22.2
puppeteer-core:
specifier: ^22.15.0
version: 22.15.0
specifier: ^23.0.1
version: 23.0.1
standalone-electron-types:
specifier: ^1.0.0
version: 1.0.0(patch_hash=cvychuhjtbzvtowhc2efrgpqjq)
@ -158,11 +158,11 @@ importers:
specifier: ^5.5.4
version: 5.5.4
typescript-eslint:
specifier: ^8.0.0
version: 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
specifier: ^8.0.1
version: 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
typescript-transform-paths:
specifier: ^3.4.7
version: 3.4.7(typescript@5.5.4)
specifier: ^3.4.10
version: 3.4.10(typescript@5.5.4)
zip-local:
specifier: ^0.3.5
version: 0.3.5
@ -204,8 +204,8 @@ importers:
specifier: ^7.5.8
version: 7.5.8
'@typescript-eslint/typescript-estree':
specifier: ^8.0.0
version: 8.0.0(typescript@5.5.4)
specifier: ^8.0.1
version: 8.0.1(typescript@5.5.4)
eslint:
specifier: ^9.8.0
version: 9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
@ -226,10 +226,10 @@ importers:
version: 55.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
eslint-plugin-unused-imports:
specifier: ^4.0.1
version: 4.0.1(@typescript-eslint/eslint-plugin@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
version: 4.0.1(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
puppeteer-core:
specifier: ^22.15.0
version: 22.15.0
specifier: ^23.0.1
version: 23.0.1
semver:
specifier: ^7.6.3
version: 7.6.3
@ -240,8 +240,8 @@ importers:
specifier: ^5.5.4
version: 5.5.4
typescript-eslint:
specifier: ^8.0.0
version: 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
specifier: ^8.0.1
version: 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
packages/vencord-types:
dependencies:
@ -869,8 +869,8 @@ packages:
'@types/yazl@2.4.5':
resolution: {integrity: sha512-qpmPfx32HS7vlGJf7EsoM9qJnLZhXJBf1KH0hzfdc+D794rljQWh4H0I/UrZy+6Nhqn0l2jdBZXBGZtR1vnHqw==}
'@typescript-eslint/eslint-plugin@8.0.0':
resolution: {integrity: sha512-STIZdwEQRXAHvNUS6ILDf5z3u95Gc8jzywunxSNqX00OooIemaaNIA0vEgynJlycL5AjabYLLrIyHd4iazyvtg==}
'@typescript-eslint/eslint-plugin@8.0.1':
resolution: {integrity: sha512-5g3Y7GDFsJAnY4Yhvk8sZtFfV6YNF2caLzjrRPUBzewjPCaj0yokePB4LJSobyCzGMzjZZYFbwuzbfDHlimXbQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
@ -880,8 +880,8 @@ packages:
typescript:
optional: true
'@typescript-eslint/parser@8.0.0':
resolution: {integrity: sha512-pS1hdZ+vnrpDIxuFXYQpLTILglTjSYJ9MbetZctrUawogUsPdz31DIIRZ9+rab0LhYNTsk88w4fIzVheiTbWOQ==}
'@typescript-eslint/parser@8.0.1':
resolution: {integrity: sha512-5IgYJ9EO/12pOUwiBKFkpU7rS3IU21mtXzB81TNwq2xEybcmAZrE9qwDtsb5uQd9aVO9o0fdabFyAmKveXyujg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
@ -894,12 +894,12 @@ packages:
resolution: {integrity: sha512-0P2jTTqyxWp9HiKLu/Vemr2Rg1Xb5B7uHItdVZ6iAenXmPo4SZ86yOPCJwMqpCyaMiEHTNqizHfsbmCFT1x9SA==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/scope-manager@8.0.0':
resolution: {integrity: sha512-V0aa9Csx/ZWWv2IPgTfY7T4agYwJyILESu/PVqFtTFz9RIS823mAze+NbnBI8xiwdX3iqeQbcTYlvB04G9wyQw==}
'@typescript-eslint/scope-manager@8.0.1':
resolution: {integrity: sha512-NpixInP5dm7uukMiRyiHjRKkom5RIFA4dfiHvalanD2cF0CLUuQqxfg8PtEUo9yqJI2bBhF+pcSafqnG3UBnRQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/type-utils@8.0.0':
resolution: {integrity: sha512-mJAFP2mZLTBwAn5WI4PMakpywfWFH5nQZezUQdSKV23Pqo6o9iShQg1hP2+0hJJXP2LnZkWPphdIq4juYYwCeg==}
'@typescript-eslint/type-utils@8.0.1':
resolution: {integrity: sha512-+/UT25MWvXeDX9YaHv1IS6KI1fiuTto43WprE7pgSMswHbn1Jm9GEM4Txp+X74ifOWV8emu2AWcbLhpJAvD5Ng==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '*'
@ -911,8 +911,8 @@ packages:
resolution: {integrity: sha512-a29Ir0EbyKTKHnZWbNsrc/gqfIBqYPwj3F2M+jWE/9bqfEHg0AMtXzkbUkOG6QgEScxh2+Pz9OXe11jHDnHR7A==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/types@8.0.0':
resolution: {integrity: sha512-wgdSGs9BTMWQ7ooeHtu5quddKKs5Z5dS+fHLbrQI+ID0XWJLODGMHRfhwImiHoeO2S5Wir2yXuadJN6/l4JRxw==}
'@typescript-eslint/types@8.0.1':
resolution: {integrity: sha512-PpqTVT3yCA/bIgJ12czBuE3iBlM3g4inRSC5J0QOdQFAn07TYrYEQBBKgXH1lQpglup+Zy6c1fxuwTk4MTNKIw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/typescript-estree@7.17.0':
@ -924,8 +924,8 @@ packages:
typescript:
optional: true
'@typescript-eslint/typescript-estree@8.0.0':
resolution: {integrity: sha512-5b97WpKMX+Y43YKi4zVcCVLtK5F98dFls3Oxui8LbnmRsseKenbbDinmvxrWegKDMmlkIq/XHuyy0UGLtpCDKg==}
'@typescript-eslint/typescript-estree@8.0.1':
resolution: {integrity: sha512-8V9hriRvZQXPWU3bbiUV4Epo7EvgM6RTs+sUmxp5G//dBGy402S7Fx0W0QkB2fb4obCF8SInoUzvTYtc3bkb5w==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '*'
@ -939,8 +939,8 @@ packages:
peerDependencies:
eslint: ^8.56.0
'@typescript-eslint/utils@8.0.0':
resolution: {integrity: sha512-k/oS/A/3QeGLRvOWCg6/9rATJL5rec7/5s1YmdS0ZU6LHveJyGFwBvLhSRBv6i9xaj7etmosp+l+ViN1I9Aj/Q==}
'@typescript-eslint/utils@8.0.1':
resolution: {integrity: sha512-CBFR0G0sCt0+fzfnKaciu9IBsKvEKYwN9UZ+eeogK1fYHg4Qxk1yf/wLQkLXlq8wbU2dFlgAesxt8Gi76E8RTA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
@ -949,8 +949,8 @@ packages:
resolution: {integrity: sha512-RVGC9UhPOCsfCdI9pU++K4nD7to+jTcMIbXTSOcrLqUEW6gF2pU1UUbYJKc9cvcRSK1UDeMJ7pdMxf4bhMpV/A==}
engines: {node: ^18.18.0 || >=20.0.0}
'@typescript-eslint/visitor-keys@8.0.0':
resolution: {integrity: sha512-oN0K4nkHuOyF3PVMyETbpP5zp6wfyOvm7tWhTMfoqxSSsPmJIh6JNASuZDlODE8eE+0EB9uar+6+vxr9DBTYOA==}
'@typescript-eslint/visitor-keys@8.0.1':
resolution: {integrity: sha512-W5E+o0UfUcK5EgchLZsyVWqARmsM7v54/qEq6PY3YI5arkgmCzHiuk0zKSJJbm71V0xdRna4BGomkCTXz2/LkQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@vap/core@0.0.12':
@ -1119,8 +1119,8 @@ packages:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
chromium-bidi@0.6.3:
resolution: {integrity: sha512-qXlsCmpCZJAnoTYI83Iu6EdYQpMYdVkCfq08KDh2pmlVqK5t5IA9mGs4/LwCwp4fqisSOMXZxP3HIh8w8aRn0A==}
chromium-bidi@0.6.4:
resolution: {integrity: sha512-8zoq6ogmhQQkAKZVKO2ObFTl4uOkqoX1PlKQX3hZQ5E9cbUotcAb7h4pTNVAGGv8Z36PF3CtdOriEp/Rz82JqQ==}
peerDependencies:
devtools-protocol: '*'
@ -2135,8 +2135,8 @@ packages:
resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==}
engines: {node: '>=6'}
puppeteer-core@22.15.0:
resolution: {integrity: sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA==}
puppeteer-core@23.0.1:
resolution: {integrity: sha512-gZYLcZUkWHZW1vvKEdOZuAB++3qY96Uh4b7B22PI0802omN4Ghrjt9H1r64NVt+AmnaZ/6Q+OW60S/Q7y+BZgQ==}
engines: {node: '>=18'}
q@1.5.1:
@ -2469,8 +2469,8 @@ packages:
resolution: {integrity: sha512-ZiBujro2ohr5+Z/hZWHESLz3g08BBdrdLMieYFULJO+tWc437sn8kQsWLJoZErY8alNhxre9K4p3GURAG11n+w==}
engines: {node: '>=16'}
typescript-eslint@8.0.0:
resolution: {integrity: sha512-yQWBJutWL1PmpmDddIOl9/Mi6vZjqNCjqSGBMQ4vsc2Aiodk0SnbQQWPXbSy0HNuKCuGkw1+u4aQ2mO40TdhDQ==}
typescript-eslint@8.0.1:
resolution: {integrity: sha512-V3Y+MdfhawxEjE16dWpb7/IOgeXnLwAEEkS7v8oDqNcR1oYlqWhGH/iHqHdKVdpWme1VPZ0SoywXAkCqawj2eQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '*'
@ -2478,8 +2478,8 @@ packages:
typescript:
optional: true
typescript-transform-paths@3.4.7:
resolution: {integrity: sha512-1Us1kdkdfKd2unbkBAOV2HHRmbRBYpSuk9nJ7cLD2hP4QmfToiM/VpxNlhJc1eezVwVqSKSBjNSzZsK/fWR/9A==}
typescript-transform-paths@3.4.10:
resolution: {integrity: sha512-OPBjXDnwX/B4JzewvRAzEzcNK+hQn/JonCfUN93VARsFQcj/wk//4RJ3FPp/SgzsT1s1EJJhOass5grxy8Y2yA==}
peerDependencies:
typescript: '>=3.6.5'
@ -2934,7 +2934,7 @@ snapshots:
'@stylistic/eslint-plugin-plus@2.6.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)':
dependencies:
'@types/eslint': 9.6.0
'@typescript-eslint/utils': 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/utils': 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
eslint: 9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
transitivePeerDependencies:
- supports-color
@ -2944,7 +2944,7 @@ snapshots:
dependencies:
'@stylistic/eslint-plugin-js': 2.6.1(patch_hash=svxcf2j6uikn7di5a4erf5bw5y)(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
'@types/eslint': 9.6.0
'@typescript-eslint/utils': 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/utils': 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
eslint: 9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
transitivePeerDependencies:
- supports-color
@ -3058,14 +3058,14 @@ snapshots:
dependencies:
'@types/node': 20.14.14
'@typescript-eslint/eslint-plugin@8.0.0(@typescript-eslint/parser@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)':
'@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)':
dependencies:
'@eslint-community/regexpp': 4.11.0
'@typescript-eslint/parser': 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/scope-manager': 8.0.0
'@typescript-eslint/type-utils': 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/utils': 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/visitor-keys': 8.0.0
'@typescript-eslint/parser': 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/scope-manager': 8.0.1
'@typescript-eslint/type-utils': 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/utils': 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/visitor-keys': 8.0.1
eslint: 9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
graphemer: 1.4.0
ignore: 5.3.1
@ -3076,12 +3076,12 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)':
'@typescript-eslint/parser@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)':
dependencies:
'@typescript-eslint/scope-manager': 8.0.0
'@typescript-eslint/types': 8.0.0
'@typescript-eslint/typescript-estree': 8.0.0(typescript@5.5.4)
'@typescript-eslint/visitor-keys': 8.0.0
'@typescript-eslint/scope-manager': 8.0.1
'@typescript-eslint/types': 8.0.1
'@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4)
'@typescript-eslint/visitor-keys': 8.0.1
debug: 4.3.6
eslint: 9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
optionalDependencies:
@ -3094,15 +3094,15 @@ snapshots:
'@typescript-eslint/types': 7.17.0
'@typescript-eslint/visitor-keys': 7.17.0
'@typescript-eslint/scope-manager@8.0.0':
'@typescript-eslint/scope-manager@8.0.1':
dependencies:
'@typescript-eslint/types': 8.0.0
'@typescript-eslint/visitor-keys': 8.0.0
'@typescript-eslint/types': 8.0.1
'@typescript-eslint/visitor-keys': 8.0.1
'@typescript-eslint/type-utils@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)':
'@typescript-eslint/type-utils@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)':
dependencies:
'@typescript-eslint/typescript-estree': 8.0.0(typescript@5.5.4)
'@typescript-eslint/utils': 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4)
'@typescript-eslint/utils': 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
debug: 4.3.6
ts-api-utils: 1.3.0(typescript@5.5.4)
optionalDependencies:
@ -3113,7 +3113,7 @@ snapshots:
'@typescript-eslint/types@7.17.0': {}
'@typescript-eslint/types@8.0.0': {}
'@typescript-eslint/types@8.0.1': {}
'@typescript-eslint/typescript-estree@7.17.0(typescript@5.5.4)':
dependencies:
@ -3130,10 +3130,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/typescript-estree@8.0.0(typescript@5.5.4)':
'@typescript-eslint/typescript-estree@8.0.1(typescript@5.5.4)':
dependencies:
'@typescript-eslint/types': 8.0.0
'@typescript-eslint/visitor-keys': 8.0.0
'@typescript-eslint/types': 8.0.1
'@typescript-eslint/visitor-keys': 8.0.1
debug: 4.3.6
globby: 11.1.0
is-glob: 4.0.3
@ -3156,12 +3156,12 @@ snapshots:
- supports-color
- typescript
'@typescript-eslint/utils@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)':
'@typescript-eslint/utils@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)':
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
'@typescript-eslint/scope-manager': 8.0.0
'@typescript-eslint/types': 8.0.0
'@typescript-eslint/typescript-estree': 8.0.0(typescript@5.5.4)
'@typescript-eslint/scope-manager': 8.0.1
'@typescript-eslint/types': 8.0.1
'@typescript-eslint/typescript-estree': 8.0.1(typescript@5.5.4)
eslint: 9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
transitivePeerDependencies:
- supports-color
@ -3172,9 +3172,9 @@ snapshots:
'@typescript-eslint/types': 7.17.0
eslint-visitor-keys: 3.4.3
'@typescript-eslint/visitor-keys@8.0.0':
'@typescript-eslint/visitor-keys@8.0.1':
dependencies:
'@typescript-eslint/types': 8.0.0
'@typescript-eslint/types': 8.0.1
eslint-visitor-keys: 3.4.3
'@vap/core@0.0.12':
@ -3353,7 +3353,7 @@ snapshots:
ansi-styles: 4.3.0
supports-color: 7.2.0
chromium-bidi@0.6.3(devtools-protocol@0.0.1312386):
chromium-bidi@0.6.4(devtools-protocol@0.0.1312386):
dependencies:
devtools-protocol: 0.0.1312386
mitt: 3.0.1
@ -3678,12 +3678,12 @@ snapshots:
semver: 7.6.3
strip-indent: 3.0.0
eslint-plugin-unused-imports@4.0.1(@typescript-eslint/eslint-plugin@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)):
eslint-plugin-unused-imports@4.0.1(@typescript-eslint/eslint-plugin@8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)):
dependencies:
eslint: 9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
eslint-rule-composer: 0.3.0
optionalDependencies:
'@typescript-eslint/eslint-plugin': 8.0.0(@typescript-eslint/parser@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
eslint-rule-composer@0.3.0: {}
@ -4429,10 +4429,10 @@ snapshots:
punycode@2.1.1: {}
puppeteer-core@22.15.0:
puppeteer-core@23.0.1:
dependencies:
'@puppeteer/browsers': 2.3.0
chromium-bidi: 0.6.3(devtools-protocol@0.0.1312386)
chromium-bidi: 0.6.4(devtools-protocol@0.0.1312386)
debug: 4.3.6
devtools-protocol: 0.0.1312386
ws: 8.18.0
@ -4814,18 +4814,18 @@ snapshots:
type-fest@4.23.0: {}
typescript-eslint@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4):
typescript-eslint@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4):
dependencies:
'@typescript-eslint/eslint-plugin': 8.0.0(@typescript-eslint/parser@8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/parser': 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/utils': 8.0.0(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/eslint-plugin': 8.0.1(@typescript-eslint/parser@8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4))(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/parser': 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
'@typescript-eslint/utils': 8.0.1(eslint@9.8.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.5.4)
optionalDependencies:
typescript: 5.5.4
transitivePeerDependencies:
- eslint
- supports-color
typescript-transform-paths@3.4.7(typescript@5.5.4):
typescript-transform-paths@3.4.10(typescript@5.5.4):
dependencies:
minimatch: 3.1.2
typescript: 5.5.4

View file

@ -74,6 +74,7 @@ export function removeContextMenuPatch<T extends [string, ...string[]] | string>
const results = navIds.map(id => navPatches.get(id)?.delete(patch) ?? false);
// https://github.com/microsoft/TypeScript/issues/33912
return (Array.isArray(navId) ? results : results[0]) as T extends string ? boolean : boolean[];
}

View file

@ -99,7 +99,7 @@ interface ProfileCustomizationPreviewProps {
pendingNickname?: string | null | undefined;
pendingProfileEffectId?: string | null | undefined;
pendingPronouns?: string | null | undefined;
pendingThemeColors?: [primaryColor?: number | null | undefined, accentColor?: number | null | undefined] | null | undefined;
pendingThemeColors?: [primaryColor?: number | null, accentColor?: number | null] | null | undefined;
user: UserRecord;
}

View file

@ -52,7 +52,7 @@ export default definePlugin({
find: ".Messages.MUTUAL_GUILDS_WITH_END_COUNT", // Note: the module is lazy-loaded
replacement: {
match: /(?<=\.tabBarItem.{0,50}MUTUAL_GUILDS.+?}\),)(?=.+?(\(0,\i\.jsxs?\)\(.{0,100}id:))/,
replace: '$self.isBotOrSelf(arguments[0].user)?null:$1"MUTUAL_GDMS",children:$self.getMutualGDMCountText(arguments[0].user)}),'
replace: '$self.isBotOrMe(arguments[0].user)?null:$1"MUTUAL_GDMS",children:$self.getMutualGDMCountText(arguments[0].user)}),'
}
},
{
@ -67,7 +67,7 @@ export default definePlugin({
replacement: [
{
match: /(?<=onItemSelect:\i,children:)(\i)\.map/,
replace: "[...$1, ...($self.isBotOrSelf(arguments[0].user) ? [] : [{section:'MUTUAL_GDMS',text:$self.getMutualGDMCountText(arguments[0].user)}])].map"
replace: "[...$1, ...($self.isBotOrMe(arguments[0].user) ? [] : [{section:'MUTUAL_GDMS',text:$self.getMutualGDMCountText(arguments[0].user)}])].map"
},
{
match: /\(0,\i\.jsx\)\(\i,\{items:\i,section:(\i)/,