diff --git a/src/helpers/invites/create_invite.ts b/src/helpers/invites/create_invite.ts index 7711b05d2..36cb94232 100644 --- a/src/helpers/invites/create_invite.ts +++ b/src/helpers/invites/create_invite.ts @@ -6,7 +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)) {