Skip to main content

Class RestGuildEvent

Assembly: Discord.Net.Rest.dll​
View Source​
Declaration
public class RestGuildEvent : RestEntity<ulong>, IGuildScheduledEvent, IEntity<ulong>

Properties​

Guild​

Gets the guild this event is scheduled in.

View Source​
Declaration
public IGuild Guild { get; }

ChannelId​

Gets the optional channel id where this event will be hosted.

View Source​
Declaration
public ulong? ChannelId { get; }

Creator​

Gets the user who created the event.

View Source​
Declaration
public IUser Creator { get; }

CreatorId​

View Source​
Declaration
public ulong CreatorId { get; }

Name​

Gets the name of the event.

View Source​
Declaration
public string Name { get; }

Description​

Gets the description of the event.

View Source​
Declaration
public string Description { get; }

StartTime​

Gets the start time of the event.

View Source​
Declaration
public DateTimeOffset StartTime { get; }

EndTime​

Gets the optional end time of the event.

View Source​
Declaration
public DateTimeOffset? EndTime { get; }

PrivacyLevel​

Gets the privacy level of the event.

View Source​
Declaration
public GuildScheduledEventPrivacyLevel PrivacyLevel { get; }

Status​

Gets the status of the event.

View Source​
Declaration
public GuildScheduledEventStatus Status { get; }

Type​

Gets the type of the event.

View Source​
Declaration
public GuildScheduledEventType Type { get; }

EntityId​

Gets the optional entity id of the event. The "entity" of the event can be a stage instance event as is seperate from Discord.IGuildScheduledEvent.ChannelId.

View Source​
Declaration
public ulong? EntityId { get; }

Location​

Gets the location of the event if the Discord.IGuildScheduledEvent.Type is external.

View Source​
Declaration
public string Location { get; }

UserCount​

Gets the user count of the event.

View Source​
Declaration
public int? UserCount { get; }

Methods​

StartAsync(RequestOptions)​

Starts the event.

View Source​
Declaration
public Task StartAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous start operation.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

EndAsync(RequestOptions)​

Ends or canceles the event.

View Source​
Declaration
public Task EndAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous end operation.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

DeleteAsync(RequestOptions)​

Deletes the current event.

View Source​
Declaration
public Task DeleteAsync(RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous delete operation.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

ModifyAsync(Action<GuildScheduledEventsProperties>, RequestOptions)​

Modifies the guild event.

View Source​
Declaration
public async Task ModifyAsync(Action<GuildScheduledEventsProperties> func, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task: A task that represents the asynchronous modification operation.

Parameters​
TypeNameDescription
System.Action<Discord.GuildScheduledEventsProperties>funcThe delegate containing the properties to modify the event with.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetUsersAsync(RequestOptions)​

Gets a collection of N users interested in the event.

View Source​
Declaration
public IAsyncEnumerable<IReadOnlyCollection<RestUser>> GetUsersAsync(RequestOptions options = null)
Returns​

System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<Discord.Rest.RestUser>>: Paged collection of users.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

GetUsersAsync(UInt64, Direction, Int32, RequestOptions)​

Gets a collection of N users interested in the event.

View Source​
Declaration
public IAsyncEnumerable<IReadOnlyCollection<RestUser>> GetUsersAsync(ulong fromUserId, Direction dir, int limit = 100, RequestOptions options = null)
Returns​

System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<Discord.Rest.RestUser>>: Paged collection of users.

Parameters​
TypeNameDescription
System.UInt64fromUserIdThe ID of the starting user to get the users from.
Discord.DirectiondirThe direction of the users to be gotten from.
System.Int32limitThe numbers of users to be gotten from.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

IGuildScheduledEvent.GetUsersAsync(RequestOptions)​

Gets a collection of N users interested in the event.

View Source​
Declaration
IAsyncEnumerable<IReadOnlyCollection<IUser>> IGuildScheduledEvent.GetUsersAsync(RequestOptions options)
Returns​

System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<Discord.IUser>>: Paged collection of users.

Parameters​
TypeNameDescription
Discord.RequestOptionsoptionsThe options to be used when sending the request.

IGuildScheduledEvent.GetUsersAsync(UInt64, Direction, Int32, RequestOptions)​

Gets a collection of N users interested in the event.

View Source​
Declaration
IAsyncEnumerable<IReadOnlyCollection<IUser>> IGuildScheduledEvent.GetUsersAsync(ulong fromUserId, Direction dir, int limit, RequestOptions options)
Returns​

System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<Discord.IUser>>: Paged collection of users.

Parameters​
TypeNameDescription
System.UInt64fromUserIdThe ID of the starting user to get the users from.
Discord.DirectiondirThe direction of the users to be gotten from.
System.Int32limitThe numbers of users to be gotten from.
Discord.RequestOptionsoptionsThe options to be used when sending the request.

Implements​