Search Results for

    Show / Hide Table of Contents

    Interface IGuildScheduledEvent

    Represents a generic guild scheduled event.

    Inherited Members
    IEntity<UInt64>.Id
    Namespace: Discord
    Assembly: Discord.Net.Core.dll
    Syntax
    public interface IGuildScheduledEvent : IEntity<ulong>

    Properties

    | Improve this Doc View Source

    ChannelId

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

    Declaration
    ulong? ChannelId { get; }
    Property Value
    Type Description
    Nullable<UInt64>
    | Improve this Doc View Source

    CoverImageId

    Gets the banner asset id of the event.

    Declaration
    string CoverImageId { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Creator

    Gets the user who created the event.

    Declaration
    IUser Creator { get; }
    Property Value
    Type Description
    IUser
    | Improve this Doc View Source

    Description

    Gets the description of the event.

    Declaration
    string Description { get; }
    Property Value
    Type Description
    String
    Remarks

    This field is null when the event doesn't have a discription.

    | Improve this Doc View Source

    EndTime

    Gets the optional end time of the event.

    Declaration
    DateTimeOffset? EndTime { get; }
    Property Value
    Type Description
    Nullable<DateTimeOffset>
    | Improve this Doc View Source

    EntityId

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

    Declaration
    ulong? EntityId { get; }
    Property Value
    Type Description
    Nullable<UInt64>
    | Improve this Doc View Source

    Guild

    Gets the guild this event is scheduled in.

    Declaration
    IGuild Guild { get; }
    Property Value
    Type Description
    IGuild
    | Improve this Doc View Source

    Location

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

    Declaration
    string Location { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Name

    Gets the name of the event.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    PrivacyLevel

    Gets the privacy level of the event.

    Declaration
    GuildScheduledEventPrivacyLevel PrivacyLevel { get; }
    Property Value
    Type Description
    GuildScheduledEventPrivacyLevel
    | Improve this Doc View Source

    StartTime

    Gets the start time of the event.

    Declaration
    DateTimeOffset StartTime { get; }
    Property Value
    Type Description
    DateTimeOffset
    | Improve this Doc View Source

    Status

    Gets the status of the event.

    Declaration
    GuildScheduledEventStatus Status { get; }
    Property Value
    Type Description
    GuildScheduledEventStatus
    | Improve this Doc View Source

    Type

    Gets the type of the event.

    Declaration
    GuildScheduledEventType Type { get; }
    Property Value
    Type Description
    GuildScheduledEventType
    | Improve this Doc View Source

    UserCount

    Gets the user count of the event.

    Declaration
    int? UserCount { get; }
    Property Value
    Type Description
    Nullable<Int32>

    Methods

    | Improve this Doc View Source

    DeleteAsync(RequestOptions)

    Deletes the current event.

    Declaration
    Task DeleteAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous delete operation.

    | Improve this Doc View Source

    EndAsync(RequestOptions)

    Ends or canceles the event.

    Declaration
    Task EndAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous end operation.

    | Improve this Doc View Source

    GetCoverImageUrl(ImageFormat, UInt16)

    Gets this events banner image url.

    Declaration
    string GetCoverImageUrl(ImageFormat format = ImageFormat.Auto, ushort size = null)
    Parameters
    Type Name Description
    ImageFormat format

    The format to return.

    UInt16 size

    The size of the image to return in. This can be any power of two between 16 and 2048.

    Returns
    Type Description
    String

    The cover images url.

    | Improve this Doc View Source

    GetUsersAsync(RequestOptions)

    Gets a collection of N users interested in the event.

    Declaration
    IAsyncEnumerable<IReadOnlyCollection<IUser>> GetUsersAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    IAsyncEnumerable<IReadOnlyCollection<IUser>>

    Paged collection of users.

    Remarks

    important

    The returned collection is an asynchronous enumerable object; one must call FlattenAsync<T>(IAsyncEnumerable<IEnumerable<T>>) to access the individual messages as a collection.

    This method will attempt to fetch all users that are interested in the event. The library will attempt to split up the requests according to and MaxGuildEventUsersPerBatch. In other words, if there are 300 users, and the MaxGuildEventUsersPerBatch constant is 100, the request will be split into 3 individual requests; thus returning 3 individual asynchronous responses, hence the need of flattening.

    | Improve this Doc View Source

    GetUsersAsync(UInt64, Direction, Int32, RequestOptions)

    Gets a collection of N users interested in the event.

    Declaration
    IAsyncEnumerable<IReadOnlyCollection<IUser>> GetUsersAsync(ulong fromUserId, Direction dir, int limit = null, RequestOptions options = null)
    Parameters
    Type Name Description
    UInt64 fromUserId

    The ID of the starting user to get the users from.

    Direction dir

    The direction of the users to be gotten from.

    Int32 limit

    The numbers of users to be gotten from.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    IAsyncEnumerable<IReadOnlyCollection<IUser>>

    Paged collection of users.

    Remarks

    important

    The returned collection is an asynchronous enumerable object; one must call FlattenAsync<T>(IAsyncEnumerable<IEnumerable<T>>) to access the individual users as a collection.

    warning

    Do not fetch too many users at once! This may cause unwanted preemptive rate limit or even actual rate limit, causing your bot to freeze!

    This method will attempt to fetch the number of users specified under limit around the user fromUserId depending on the dir. The library will attempt to split up the requests according to your limit and MaxGuildEventUsersPerBatch. In other words, should the user request 500 users, and the MaxGuildEventUsersPerBatch constant is 100, the request will be split into 5 individual requests; thus returning 5 individual asynchronous responses, hence the need of flattening.

    | Improve this Doc View Source

    ModifyAsync(Action<GuildScheduledEventsProperties>, RequestOptions)

    Modifies the guild event.

    Declaration
    Task ModifyAsync(Action<GuildScheduledEventsProperties> func, RequestOptions options = null)
    Parameters
    Type Name Description
    Action<GuildScheduledEventsProperties> func

    The delegate containing the properties to modify the event with.

    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous modification operation.

    | Improve this Doc View Source

    StartAsync(RequestOptions)

    Starts the event.

    Declaration
    Task StartAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options

    The options to be used when sending the request.

    Returns
    Type Description
    Task

    A task that represents the asynchronous start operation.

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.7.2