Table of Contents

Method CreateScheduledEventAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

CreateScheduledEventAsync(string, DateTimeOffset, string, Optional<Stream>, string)

Creates a scheduled event based on the channel type.

public Task<DiscordScheduledEvent> CreateScheduledEventAsync(string name, DateTimeOffset scheduledStartTime, string description = null, Optional<Stream> coverImage = default, string reason = null)

Parameters

name string

The name.

scheduledStartTime DateTimeOffset

The scheduled start time.

description string

The description.

coverImage Optional<Stream>

The cover image.

reason string

The reason.

Returns

Task<DiscordScheduledEvent>

A scheduled event.

Exceptions

NotFoundException

Thrown when the resource does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.