chore(repo): prune dead code and duplicate abstractions (#3413)

This commit is contained in:
Hampus authored and GitHub committed 2026-10-12 13:09:42 +02:00
1 parent c17091768c
commit c9fdf8fead
2937 files changed
+42233 -176793

No files matched your search

-1
View File
@@ -16,7 +16,6 @@ export const APIErrorCodes = {
ACCOUNT_TOO_NEW_FOR_GUILD: 'ACCOUNT_TOO_NEW_FOR_GUILD',
ACLS_MUST_BE_NON_EMPTY: 'ACLS_MUST_BE_NON_EMPTY',
ADMIN_API_KEY_NOT_FOUND: 'ADMIN_API_KEY_NOT_FOUND',
APPLICATION_NOT_OWNED: 'APPLICATION_NOT_OWNED',
ALREADY_FRIENDS: 'ALREADY_FRIENDS',
BOTS_CANNOT_CREATE_GUILDS: 'BOTS_CANNOT_CREATE_GUILDS',
BOTS_CANNOT_SEND_FRIEND_REQUESTS: 'BOTS_CANNOT_SEND_FRIEND_REQUESTS',
-4
View File
@@ -44,10 +44,6 @@ export function isNumericTierPerk(perk: LimitTierPerk): perk is NumericTierPerk
return perk.type === 'numeric';
}
export function isTextTierPerk(perk: LimitTierPerk): perk is TextTierPerk {
return perk.type === 'text';
}
export const LIMIT_TIER_PERKS: ReadonlyArray<LimitTierPerk> = [
{
id: 'custom_discriminator',
@@ -11,7 +11,6 @@ import {
import * as ThreadConstants from '@fluxer/constants/src/ThreadConstants';
import {
ChannelFlags,
isThreadAutoArchiveDuration,
isValidThreadMemberSettingsFlags,
publicThreadTypeFor,
resolveTextThreadType,
@@ -96,15 +95,6 @@ describe('thread constants', () => {
}
});
it('accepts only the supported auto archive durations', () => {
for (const duration of [60, 1440, 4320, 10080]) {
expect(isThreadAutoArchiveDuration(duration)).toBe(true);
}
for (const duration of [0, 59, 61, 10081]) {
expect(isThreadAutoArchiveDuration(duration)).toBe(false);
}
});
it('allows at most one notification bit on thread member settings', () => {
expect(isValidThreadMemberSettingsFlags(0)).toBe(true);
expect(isValidThreadMemberSettingsFlags(ThreadMemberFlags.ALL_MESSAGES)).toBe(true);
@@ -48,8 +48,6 @@ export const ChannelFlags = {
HIDE_MEDIA_DOWNLOAD_OPTIONS: 1 << 15,
} as const;
export type ChannelFlag = ValueOf<typeof ChannelFlags>;
export function settableChannelFlags(type: number, parentType?: number | null): number {
switch (type) {
case ChannelTypes.PUBLIC_THREAD:
@@ -121,10 +119,6 @@ export type ThreadAutoArchiveDuration = (typeof THREAD_AUTO_ARCHIVE_DURATIONS)[n
export const DEFAULT_THREAD_AUTO_ARCHIVE_DURATION: ThreadAutoArchiveDuration = 4320;
export function isThreadAutoArchiveDuration(value: number): value is ThreadAutoArchiveDuration {
return (THREAD_AUTO_ARCHIVE_DURATIONS as ReadonlyArray<number>).includes(value);
}
export const THREAD_NAME_MIN_LENGTH = 1;
export const THREAD_NAME_MAX_LENGTH = 100;
export const FORUM_TOPIC_MAX_LENGTH = 4096;