Table of Contents

Method CreateEventAsync

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

CreateEventAsync(string, string, ulong?, DiscordScheduledGuildEventType, DiscordScheduledGuildEventPrivacyLevel, DateTimeOffset, DateTimeOffset?, string?, Stream?, string?)

Creates a new scheduled event in this guild.

public Task<DiscordScheduledGuildEvent> CreateEventAsync(string name, string description, ulong? channelId, DiscordScheduledGuildEventType type, DiscordScheduledGuildEventPrivacyLevel privacyLevel, DateTimeOffset start, DateTimeOffset? end, string? location = null, Stream? image = null, string? reason = null)

Parameters

name string

The name of the event to create, up to 100 characters.

description string

The description of the event, up to 1000 characters.

channelId ulong?

If a StageInstance or VoiceChannel, the id of the channel the event will be hosted in

type DiscordScheduledGuildEventType

The type of the event. must be supplied if not an external event.

privacyLevel DiscordScheduledGuildEventPrivacyLevel

The privacy level of thi

start DateTimeOffset

When this event starts. Must be in the future, and before the end date.

end DateTimeOffset?

When this event ends. If supplied, must be in the future and after the end date. This is required for External.

location string

Where this event takes place, up to 100 characters. Only applicable if the type is External

image Stream

A cover image for this event.

reason string

Reason for audit log.

Returns

Task<DiscordScheduledGuildEvent>

The created event.