Prettified Code!

This commit is contained in:
itohatweb
2021-05-21 15:55:49 +00:00
committed by GitHub Action
parent 71a20fb0f4
commit 179add27c9
271 changed files with 889 additions and 3067 deletions
+2 -9
View File
@@ -6,10 +6,7 @@ import { endpoints } from "../../util/constants.ts";
import { requireBotChannelPermissions } from "../../util/permissions.ts";
/** Creates a new invite for this channel. Requires CREATE_INSTANT_INVITE */
export async function createInvite(
channelId: bigint,
options: CreateChannelInvite
) {
export async function createInvite(channelId: bigint, options: CreateChannelInvite) {
await requireBotChannelPermissions(channelId, ["CREATE_INSTANT_INVITE"]);
if (options.maxAge && (options.maxAge < 0 || options.maxAge > 604800)) {
@@ -19,9 +16,5 @@ export async function createInvite(
throw new Error(Errors.INVITE_MAX_USES_INVALID);
}
return await rest.runMethod<Invite>(
"post",
endpoints.CHANNEL_INVITES(channelId),
options
);
return await rest.runMethod<Invite>("post", endpoints.CHANNEL_INVITES(channelId), options);
}