mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
get raw user
This commit is contained in:
@@ -29,6 +29,7 @@ import {
|
||||
PrunePayload,
|
||||
ChannelCreateOptions,
|
||||
BannedUser,
|
||||
UserPayload,
|
||||
} from "../types/guild.ts";
|
||||
import { RoleData } from "../types/role.ts";
|
||||
import { createRole } from "../structures/role.ts";
|
||||
@@ -622,3 +623,8 @@ export function getWebhooks(guildID: string) {
|
||||
|
||||
return RequestManager.get(endpoints.GUILD_WEBHOOKS(guildID));
|
||||
}
|
||||
|
||||
/** This function will return the raw user payload in the rare cases you need to fetch a user directly from the API. */
|
||||
export function getUser(userID: string) {
|
||||
return RequestManager.get(endpoints.USER(userID)) as Promise<UserPayload>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user