fix: getInvite return type

This commit is contained in:
ITOH
2021-05-22 17:57:32 +02:00
parent 4b8f009277
commit 9f9a344eef
+2 -2
View File
@@ -1,10 +1,10 @@
import { rest } from "../../rest/rest.ts";
import { GetInvite } from "../../types/invites/get_invite.ts";
import type { Invite } from "../../types/invites/invite.ts";
import type { InviteMetadata } from "../../types/invites/invite_metadata.ts";
import { endpoints } from "../../util/constants.ts";
import { snakelize } from "../../util/utils.ts";
/** Returns an invite for the given code or throws an error if the invite doesn't exists. */
export async function getInvite(inviteCode: string, options?: GetInvite) {
return await rest.runMethod<Invite>("get", endpoints.INVITE(inviteCode), snakelize(options ?? {}));
return await rest.runMethod<InviteMetadata>("get", endpoints.INVITE(inviteCode), snakelize(options ?? {}));
}