mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 17:30:07 +00:00
more thread fixes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
export * from "./transformers/mod.ts";
|
||||
export * from "./bigint.ts";
|
||||
export * from "./cache_members.ts";
|
||||
export * from "./collection.ts";
|
||||
|
||||
@@ -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 {
|
||||
2
src/util/transformers/mod.ts
Normal file
2
src/util/transformers/mod.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from "./channel_to_thread.ts";
|
||||
export * from "./thread_member_modified.ts";
|
||||
11
src/util/transformers/thread_member_modified.ts
Normal file
11
src/util/transformers/thread_member_modified.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user