mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
first chunk
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import type { Bot } from "../../../bot.ts";
|
||||
import { ThreadMember } from "../../../types/channels/threads/thread_member.ts";
|
||||
|
||||
/** Returns thread members objects that are members of the thread. */
|
||||
export async function getThreadMembers(bot: Bot, threadId: bigint) {
|
||||
const result = await bot.rest.runMethod<ThreadMember[]>(
|
||||
bot.rest,
|
||||
"get",
|
||||
bot.constants.endpoints.THREAD_MEMBERS(threadId)
|
||||
);
|
||||
return result;
|
||||
|
||||
// return new Collection(result.map((res) => [bot.transformers.snowflake(result.userId), {
|
||||
// id?: string;
|
||||
// /** The id of the user */
|
||||
// userId?: string;
|
||||
// /** The time the current user last joined the thread */
|
||||
// joinTimestamp: string;
|
||||
// }]));
|
||||
}
|
||||
Reference in New Issue
Block a user