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
namestringThe name of the event to create, up to 100 characters.
descriptionstringThe description of the event, up to 1000 characters.
channelIdulong?If a StageInstance or VoiceChannel, the id of the channel the event will be hosted in
typeDiscordScheduledGuildEventTypeThe type of the event.
must be supplied if not an external event. privacyLevelDiscordScheduledGuildEventPrivacyLevelThe privacy level of thi
startDateTimeOffsetWhen this event starts. Must be in the future, and before the end date.
endDateTimeOffset?When this event ends. If supplied, must be in the future and after the end date. This is required for External.
locationstringWhere this event takes place, up to 100 characters. Only applicable if the type is External
imageStreamA cover image for this event.
reasonstringReason for audit log.
Returns
- Task<DiscordScheduledGuildEvent>
The created event.