Table of Contents

Method CreateChannelInviteAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.Rest.dll

CreateChannelInviteAsync(ulong, int, int, bool, bool, string, DiscordInviteTargetType?, ulong?, ulong?)

Creates a channel invite

public Task<DiscordInvite> CreateChannelInviteAsync(ulong channelId, int maxAge, int maxUses, bool temporary, bool unique, string reason, DiscordInviteTargetType? targetType = null, ulong? targetUserId = null, ulong? targetApplicationId = null)

Parameters

channelId ulong

Channel ID

maxAge int

For how long the invite should exist

maxUses int

How often the invite may be used

temporary bool

Whether this invite should be temporary

unique bool

Whether this invite should be unique (false might return an existing invite)

reason string

Why you made an invite

targetType DiscordInviteTargetType?

The target type of the invite, for stream and embedded application invites.

targetUserId ulong?

The ID of the target user.

targetApplicationId ulong?

The ID of the target application.

Returns

Task<DiscordInvite>