Skip to main content

Class SocketGuildEvent

Represents a WebSocket-based guild event.

Assembly: Discord.Net.WebSocket.dll​
View Source​
Declaration
public class SocketGuildEvent : SocketEntity<ulong>, IGuildScheduledEvent, IEntity<ulong>

Properties​

Guild​

Gets the guild of the event.

View Source​
Declaration
public SocketGuild Guild { get; }

Channel​

Gets the channel of the event.

View Source​
Declaration
public SocketGuildChannel Channel { get; }

Creator​

Gets the user who created the event.

View Source​
Declaration
public SocketGuildUser Creator { 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; }

IGuildScheduledEvent.Guild​

Gets the guild this event is scheduled in.

View Source​
Declaration
IGuild IGuildScheduledEvent.Guild { get; }

IGuildScheduledEvent.Creator​

Gets the user who created the event.

View Source​
Declaration
IUser IGuildScheduledEvent.Creator { get; }

IGuildScheduledEvent.ChannelId​

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

View Source​
Declaration
ulong? IGuildScheduledEvent.ChannelId { get; }

Methods​

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.

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.

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(Int32, RequestOptions)​

Gets a collection of users that are interested in this event.

View Source​
Declaration
public Task<IReadOnlyCollection<RestUser>> GetUsersAsync(int limit = 100, RequestOptions options = null)
Returns​

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<Discord.Rest.RestUser>>: A read-only collection of users.

Parameters​
TypeNameDescription
System.Int32limitThe amount of users to fetch.
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​