mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
refactor(helpers): separate functions into files (#667)
* refactor(helpers): separate functions into files * idk * idk
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { RequestManager } from "../../rest/request_manager.ts";
|
||||
import { UserPayload } from "../../types/mod.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) {
|
||||
const result = await RequestManager.get(endpoints.USER(userID));
|
||||
|
||||
return result as UserPayload;
|
||||
}
|
||||
Reference in New Issue
Block a user