From b0ea2549ad42ba0b13017c1976f158972f7c8052 Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Tue, 4 May 2021 22:12:04 +0200 Subject: [PATCH] getinvites add options --- src/helpers/invites/get_invite.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers/invites/get_invite.ts b/src/helpers/invites/get_invite.ts index f0781e927..12772f327 100644 --- a/src/helpers/invites/get_invite.ts +++ b/src/helpers/invites/get_invite.ts @@ -1,11 +1,14 @@ import { rest } from "../../rest/rest.ts"; +import { GetInvite } from "../../types/invites/get_invite.ts"; import type { Invite } from "../../types/invites/invite.ts"; import { endpoints } from "../../util/constants.ts"; +import { camelKeysToSnakeCase } 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) { +export async function getInvite(inviteCode: string, options: GetInvite) { return await rest.runMethod( "get", endpoints.INVITE(inviteCode), + camelKeysToSnakeCase(options), ); }