mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-01 00:10:07 +00:00
10 lines
427 B
TypeScript
10 lines
427 B
TypeScript
import type { User } from "../../types/users/user.ts";
|
|
import type { Bot } from "../../bot.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(bot: Bot, userId: bigint) {
|
|
const result = await bot.rest.runMethod<User>(bot.rest, "get", bot.constants.endpoints.USER(userId));
|
|
|
|
return bot.transformers.user(bot, result);
|
|
}
|