more thread fixes

This commit is contained in:
Skillz4Killz
2021-06-13 20:45:47 +00:00
committed by GitHub
parent 37d3952559
commit 950482c503
11 changed files with 51 additions and 20 deletions

View File

@@ -1,3 +1,4 @@
export * from "./transformers/mod.ts";
export * from "./bigint.ts";
export * from "./cache_members.ts";
export * from "./collection.ts";

View File

@@ -1,5 +1,5 @@
import { Channel } from "../types/channels/channel.ts";
import { snowflakeToBigint } from "./bigint.ts";
import { Channel } from "../../types/channels/channel.ts";
import { snowflakeToBigint } from "../bigint.ts";
export function channelToThread(channel: Channel) {
return {

View File

@@ -0,0 +1,2 @@
export * from "./channel_to_thread.ts";
export * from "./thread_member_modified.ts";

View File

@@ -0,0 +1,11 @@
import { ThreadMember, ThreadMemberModified } from "../../types/channels/threads/thread_member.ts";
import { snowflakeToBigint } from "../bigint.ts";
export function threadMemberModified(member: ThreadMember) {
return {
...member,
id: snowflakeToBigint(member.id),
userId: snowflakeToBigint(member.userId),
joinTimestamp: Date.parse(member.joinTimestamp),
} as ThreadMemberModified;
}