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
stringThe name of the event to create, up to 100 characters.
description
stringThe 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
DiscordScheduledGuildEventTypeThe type of the event.
must be supplied if not an external event. privacyLevel
DiscordScheduledGuildEventPrivacyLevelThe privacy level of thi
start
DateTimeOffsetWhen 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
stringWhere this event takes place, up to 100 characters. Only applicable if the type is External
image
StreamA cover image for this event.
reason
stringReason for audit log.
Returns
- Task<DiscordScheduledGuildEvent>
The created event.