Files
discordeno/src/helpers/misc/get_user.ts
T
2021-04-24 19:39:40 +02:00

9 lines
385 B
TypeScript

import { rest } from "../../rest/rest.ts";
import { User } from "../../types/users/user.ts";
import { endpoints } from "../../util/constants.ts";
/** This function will return the raw user payload in the rare cases you need to fetch a user directly from the API. */
export async function getUser(userId: string) {
return await rest.runMethod<User>("get", endpoints.USER(userId));
}