mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
12 lines
396 B
TypeScript
12 lines
396 B
TypeScript
import { rest } from "../../rest/rest.ts";
|
|
import type { Invite } from "../../types/invites/invite.ts";
|
|
import { endpoints } from "../../util/constants.ts";
|
|
|
|
/** Returns an invite for the given code or throws an error if the invite doesn't exists. */
|
|
export async function getInvite(inviteCode: string) {
|
|
return await rest.runMethod<Invite>(
|
|
"get",
|
|
endpoints.INVITE(inviteCode),
|
|
);
|
|
}
|