mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
Update get_invite.ts
This commit is contained in:
@@ -5,10 +5,10 @@ import { endpoints } from "../../util/constants.ts";
|
|||||||
import { camelKeysToSnakeCase } from "../../util/utils.ts";
|
import { camelKeysToSnakeCase } from "../../util/utils.ts";
|
||||||
|
|
||||||
/** Returns an invite for the given code or throws an error if the invite doesn't exists. */
|
/** 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) {
|
export async function getInvite(inviteCode: string, options?: GetInvite) {
|
||||||
return await rest.runMethod<Invite>(
|
return await rest.runMethod<Invite>(
|
||||||
"get",
|
"get",
|
||||||
endpoints.INVITE(inviteCode),
|
endpoints.INVITE(inviteCode),
|
||||||
camelKeysToSnakeCase(options),
|
camelKeysToSnakeCase(options ?? {}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user