fix: createInvite return type

This commit is contained in:
ITOH
2021-05-22 18:05:21 +02:00
parent b8f145f2d5
commit 3f80e921ca
+2 -2
View File
@@ -1,6 +1,6 @@
import { rest } from "../../rest/rest.ts";
import type { CreateChannelInvite } from "../../types/invites/create_channel_invite.ts";
import type { Invite } from "../../types/invites/invite.ts";
import type { InviteMetadata } from "../../types/invites/invite_metadata.ts";
import { Errors } from "../../types/discordeno/errors.ts";
import { endpoints } from "../../util/constants.ts";
import { requireBotChannelPermissions } from "../../util/permissions.ts";
@@ -16,5 +16,5 @@ export async function createInvite(channelId: bigint, options: CreateChannelInvi
throw new Error(Errors.INVITE_MAX_USES_INVALID);
}
return await rest.runMethod<Invite>("post", endpoints.CHANNEL_INVITES(channelId), options);
return await rest.runMethod<InviteMetadata>("post", endpoints.CHANNEL_INVITES(channelId), options);
}