get raw user

This commit is contained in:
Skillz
2020-09-04 23:13:34 -04:00
parent 656b44cfba
commit 7b08e4d014
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -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>;
}