mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 09:20:08 +00:00
fix: final touches
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -33,7 +33,6 @@ const baseThread: Partial<DiscordenoThread> = {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user