Files
discordeno/src/helpers/invites/get_invite.ts
T
ayntee 5f1b82a4e8 refactor: remove RequestManager and use runMethod() (#732)
* fix(rest/process_request): use DiscordHTTPResponseCodes

* refactor: remove RequestManager

* refactor: remove RequestManager and use runMethod()
2021-04-02 23:18:51 +04:00

10 lines
309 B
TypeScript

import { rest } from "../../rest/rest.ts";
import { endpoints } from "../../util/constants.ts";
/** Returns an invite for the given code. */
export async function getInvite(inviteCode: string) {
const result = await rest.runMethod("get", endpoints.INVITE(inviteCode));
return result as InvitePayload;
}