mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 00:40:07 +00:00
change: make createInivte options optional
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user