mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
fix: getInvite return type
This commit is contained in:
@@ -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 ?? {}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user