Class RestGuildEvent
Assembly: Discord.Net.Rest.dll​
View Source​
public class RestGuildEvent : RestEntity<ulong>, IGuildScheduledEvent, IEntity<ulong>
Properties​
Guild​
Gets the guild this event is scheduled in.
View Source​
public IGuild Guild { get; }
ChannelId​
Gets the optional channel id where this event will be hosted.
View Source​
public ulong? ChannelId { get; }
Creator​
Gets the user who created the event.
View Source​
public IUser Creator { get; }
CreatorId​
View Source​
public ulong CreatorId { get; }
Name​
Gets the name of the event.
View Source​
public string Name { get; }
Description​
Gets the description of the event.
View Source​
public string Description { get; }
StartTime​
Gets the start time of the event.
View Source​
public DateTimeOffset StartTime { get; }
EndTime​
Gets the optional end time of the event.
View Source​
public DateTimeOffset? EndTime { get; }
PrivacyLevel​
Gets the privacy level of the event.
View Source​
public GuildScheduledEventPrivacyLevel PrivacyLevel { get; }
Status​
Gets the status of the event.
View Source​
public GuildScheduledEventStatus Status { get; }
Type​
Gets the type of the event.
View Source​
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​
public ulong? EntityId { get; }
Location​
Gets the location of the event if the Discord.IGuildScheduledEvent.Type is external.
View Source​
public string Location { get; }
UserCount​
Gets the user count of the event.
View Source​
public int? UserCount { get; }
Methods​
StartAsync(RequestOptions)​
Starts the event.
View Source​
public Task StartAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous start operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
EndAsync(RequestOptions)​
Ends or canceles the event.
View Source​
public Task EndAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous end operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
DeleteAsync(RequestOptions)​
Deletes the current event.
View Source​
public Task DeleteAsync(RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous delete operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The options to be used when sending the request. |
ModifyAsync(Action<GuildScheduledEventsProperties>, RequestOptions)​
Modifies the guild event.
View Source​
public async Task ModifyAsync(Action<GuildScheduledEventsProperties> func, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous modification operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Action<Discord.GuildScheduledEventsProperties> | func | The delegate containing the properties to modify the event with. |
Discord.RequestOptions | options | The options to be used when sending the request. |
GetUsersAsync(RequestOptions)​
Gets a collection of N users interested in the event.
View Source​
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​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | fromUserId | The ID of the starting user to get the users from. |
Discord.Direction | dir | The direction of the users to be gotten from. |
System.Int32 | limit | The numbers of users to be gotten from. |
Discord.RequestOptions | options | The options to be used when sending the request. |
IGuildScheduledEvent.GetUsersAsync(RequestOptions)​
Gets a collection of N users interested in the event.
View Source​
IAsyncEnumerable<IReadOnlyCollection<IUser>> IGuildScheduledEvent.GetUsersAsync(RequestOptions options)
Returns​
System.Collections.Generic.IAsyncEnumerable<System.Collections.Generic.IReadOnlyCollection<Discord.IUser>>
:
Paged collection of users.
Parameters​
Type | Name | Description |
---|---|---|
Discord.RequestOptions | options | The 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​
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​
Type | Name | Description |
---|---|---|
System.UInt64 | fromUserId | The ID of the starting user to get the users from. |
Discord.Direction | dir | The direction of the users to be gotten from. |
System.Int32 | limit | The numbers of users to be gotten from. |
Discord.RequestOptions | options | The options to be used when sending the request. |