Method CreateExternalScheduledEventAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
CreateExternalScheduledEventAsync(string, DateTimeOffset, DateTimeOffset, string, string, Optional<Stream>, DiscordScheduledEventRecurrenceRule?, string)
Creates a scheduled event with type External.
public Task<DiscordScheduledEvent> CreateExternalScheduledEventAsync(string name, DateTimeOffset scheduledStartTime, DateTimeOffset scheduledEndTime, string location, string description = null, Optional<Stream> coverImage = default, DiscordScheduledEventRecurrenceRule? recurrenceRule = null, string reason = null)
Parameters
namestringThe name.
scheduledStartTimeDateTimeOffsetThe scheduled start time.
scheduledEndTimeDateTimeOffsetThe scheduled end time.
locationstringThe location of the external event.
descriptionstringThe description.
coverImageOptional<Stream>The cover image.
recurrenceRuleDiscordScheduledEventRecurrenceRuleThe recurrence rule.
reasonstringThe reason.
Returns
- Task<DiscordScheduledEvent>
A scheduled event.
Exceptions
- ValidationException
Thrown if the user gave an invalid input.
- 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.