Table of Contents

Method CreateScheduledEventAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

CreateScheduledEventAsync(string, DateTimeOffset, DateTimeOffset?, DiscordChannel, DiscordScheduledEventEntityMetadata, string, ScheduledEventEntityType, Optional<Stream>, string)

Creates a scheduled event.

public Task<DiscordScheduledEvent> CreateScheduledEventAsync(string name, DateTimeOffset scheduledStartTime, DateTimeOffset? scheduledEndTime = null, DiscordChannel channel = null, DiscordScheduledEventEntityMetadata metadata = null, string description = null, ScheduledEventEntityType type = ScheduledEventEntityType.StageInstance, Optional<Stream> coverImage = default, string reason = null)

Parameters

name string

The name.

scheduledStartTime DateTimeOffset

The scheduled start time.

scheduledEndTime DateTimeOffset?

The scheduled end time.

channel DiscordChannel

The channel.

metadata DiscordScheduledEventEntityMetadata

The metadata.

description string

The description.

type ScheduledEventEntityType

The type.

coverImage Optional<Stream>

The cover image.

reason string

The reason.

Returns

Task<DiscordScheduledEvent>

A scheduled event.

Exceptions

NotFoundException

Thrown when the guild does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.