mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
refactor: cleanup and fmt
This commit is contained in:
@@ -3,7 +3,6 @@ import { Member } from "../../structures/mod.ts";
|
||||
import { DiscordGatewayIntents } from "../../types/gateway/gateway_intents.ts";
|
||||
import { Errors } from "../../types/misc/errors.ts";
|
||||
import { Collection } from "../../util/collection.ts";
|
||||
import { requestAllMembers } from "../../ws/shard_manager.ts";
|
||||
|
||||
/**
|
||||
* ⚠️ BEGINNER DEVS!! YOU SHOULD ALMOST NEVER NEED THIS AND YOU CAN GET FROM cache.members.get()
|
||||
|
||||
@@ -15,11 +15,10 @@ export async function getMember(
|
||||
const guild = await cacheHandlers.get("guilds", guildId);
|
||||
if (!guild && !options?.force) return;
|
||||
|
||||
const data =
|
||||
(await rest.runMethod(
|
||||
"get",
|
||||
endpoints.GUILD_MEMBER(guildId, id),
|
||||
)) as MemberCreatePayload;
|
||||
const data = (await rest.runMethod(
|
||||
"get",
|
||||
endpoints.GUILD_MEMBER(guildId, id),
|
||||
)) as MemberCreatePayload;
|
||||
|
||||
const memberStruct = await structures.createMemberStruct(data, guildId);
|
||||
await cacheHandlers.set("members", memberStruct.id, memberStruct);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { cacheHandlers } from "../../cache.ts";
|
||||
import { Member } from "../../structures/mod.ts";
|
||||
import { Collection } from "../../util/collection.ts";
|
||||
import { requestAllMembers } from "../../ws/shard_manager.ts";
|
||||
|
||||
/** Returns guild member objects for the specified user by their nickname/username.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user