Method CreateScheduledGuildEventAsync
- Namespace
- DSharpPlus
- Assembly
- DSharpPlus.Rest.dll
CreateScheduledGuildEventAsync(ulong, string, string, ulong?, DiscordScheduledGuildEventType, DiscordScheduledGuildEventPrivacyLevel, DateTimeOffset, DateTimeOffset?, Stream?, string)
Creates a new scheduled guild event.
public Task<DiscordScheduledGuildEvent> CreateScheduledGuildEventAsync(ulong guildId, string name, string description, ulong? channelId, DiscordScheduledGuildEventType type, DiscordScheduledGuildEventPrivacyLevel privacyLevel, DateTimeOffset start, DateTimeOffset? end, Stream? image = null, string location = null)
Parameters
guildId
ulongThe guild to create an event on.
name
stringThe name of the event, up to 100 characters.
description
stringThe description of the event, up to 1000 characters.
channelId
ulong?The channel the event will take place in, if applicable.
type
DiscordScheduledGuildEventTypeThe type of event. If External, a end time must be specified.
privacyLevel
DiscordScheduledGuildEventPrivacyLevelThe privacy level of the event.
start
DateTimeOffsetWhen the event starts. Must be in the future and before the end date, if specified.
end
DateTimeOffset?When the event ends. Required for External
image
StreamThe image of event.
location
stringWhere this location takes place.
Returns
- Task<DiscordScheduledGuildEvent>
The created event.