Table of Contents

Method CreateGuildEventAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

CreateGuildEventAsync(string, string, DiscordScheduledGuildEventPrivacyLevel, DateTimeOffset, DateTimeOffset?)

Creates an event bound to this channel.

public Task<DiscordScheduledGuildEvent> CreateGuildEventAsync(string name, string description, DiscordScheduledGuildEventPrivacyLevel privacyLevel, DateTimeOffset start, DateTimeOffset? end)

Parameters

name string

The name of the event, up to 100 characters.

description string

The description of this event, up to 1000 characters.

privacyLevel DiscordScheduledGuildEventPrivacyLevel

The privacy level. Currently only GuildOnly is supported

start DateTimeOffset

When this event starts.

end DateTimeOffset?

When this event ends. External events require an end time.

Returns

Task<DiscordScheduledGuildEvent>

The created event.

Exceptions

InvalidOperationException