createTimestamp: discord return string, discordeno return number

This commit is contained in:
lts20050703
2022-01-28 07:41:23 +07:00
parent d155ea82db
commit 047e8b69d4
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ export function transformChannel(
archived: payload.channel.thread_metadata?.archived,
locked: payload.channel.thread_metadata?.locked,
invitable: payload.channel.invitable,
createTimestamp: payload.channel.create_timestamp,
createTimestamp: payload.channel.create_timestamp ? Date.parse(payload.channel.create_timestamp) : undefined,
};
}

View File

@@ -63,5 +63,5 @@ export interface Channel {
/** whether non-moderators can add other non-moderators to a thread; only available on private threads */
invitable?: boolean;
/** timestamp when the thread was created; only populated for threads created after 2022-01-09 */
createTimestamp?: number;
createTimestamp?: string;
}