diff --git a/src/types/channels/channel.ts b/src/types/channels/channel.ts index ceda62144..971b3bee8 100644 --- a/src/types/channels/channel.ts +++ b/src/types/channels/channel.ts @@ -56,4 +56,6 @@ export interface Channel { threadMetadata?: ThreadMetadata; /** Thread member object for the current user, if they have joined the thread, only included on certain API endpoints */ member?: ThreadMember; + /** the default duration for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity */ + defaultAutoArchiveDuration: number; } diff --git a/src/types/channels/threads/thread_metadata.ts b/src/types/channels/threads/thread_metadata.ts index 52fbdf797..60d92bbcd 100644 --- a/src/types/channels/threads/thread_metadata.ts +++ b/src/types/channels/threads/thread_metadata.ts @@ -6,8 +6,6 @@ export interface ThreadMetadata { // TODO(threads): channel struct should convert this to a unixx /** Timestamp when the thread's archive status was last changed, used for calculating recent activity */ archiveTimestamp: string; - /** id of the user that last archived or unarchived the thread */ - archiverId?: string; /** When a thread is locked, only users with `MANAGE_THREADS` can unarchive it */ locked?: boolean; } diff --git a/src/util/dispatch_requirements.ts b/src/util/dispatch_requirements.ts index a2ace0a54..612024f60 100644 --- a/src/util/dispatch_requirements.ts +++ b/src/util/dispatch_requirements.ts @@ -1,7 +1,6 @@ import { botId, eventHandlers } from "../bot.ts"; import { cache } from "../cache.ts"; import { getChannels } from "../helpers/channels/get_channels.ts"; -import { getActiveThreads } from "../helpers/channels/threads/get_active_threads.ts"; import { getGuild } from "../helpers/guilds/get_guild.ts"; import { getMember } from "../helpers/members/get_member.ts"; import { structures } from "../structures/mod.ts"; diff --git a/src/util/transformers/channel_to_thread.ts b/src/util/transformers/channel_to_thread.ts index d45867ec9..3f952805a 100644 --- a/src/util/transformers/channel_to_thread.ts +++ b/src/util/transformers/channel_to_thread.ts @@ -33,7 +33,6 @@ const baseThread: Partial = { memberCount: this.memberCount, messageCount: this.messageCount, archiveTimestamp: new Date(this.archiveTimestamp!).toISOString(), - archiverId: this.archiverId?.toString(), autoArchiveDuration: this.autoArchiveDuration, archived: this.archived, locked: this.locked, @@ -56,9 +55,6 @@ export function channelToThread(channel: Channel) { archiveTimestamp: createNewProp( channel.threadMetadata?.archiveTimestamp ? Date.parse(channel.threadMetadata.archiveTimestamp) : undefined ), - archiverId: createNewProp( - channel.threadMetadata?.archiverId ? snowflakeToBigint(channel.threadMetadata.archiverId) : undefined - ), autoArchiveDuration: createNewProp(channel.threadMetadata?.autoArchiveDuration || 0), bitfield: createNewProp(bitfield), ownerId: createNewProp(snowflakeToBigint(channel.ownerId!)), @@ -77,7 +73,6 @@ export interface Thread { memberCount: number; messageCount: number; archiveTimestamp: string; - archiverId?: string; autoArchiveDuration: number; archived: boolean; locked: boolean; @@ -95,7 +90,6 @@ export interface DiscordenoThread { memberCount: number; messageCount: number; archiveTimestamp: number; - archiverId?: bigint; autoArchiveDuration: number; archived: boolean; locked: boolean;