Search Results for

    Show / Hide Table of Contents

    Class DiscordScheduledEvent

    Represents an scheduled event.

    Inheritance
    System.Object
    SnowflakeObject
    DiscordScheduledEvent
    Inherited Members
    SnowflakeObject.Id
    SnowflakeObject.CreationTimestamp
    Namespace: DisCatSharp.Entities
    Assembly: DisCatSharp.dll
    Syntax
    public class DiscordScheduledEvent : SnowflakeObject, IEquatable<DiscordScheduledEvent>

    Properties

    | Improve this Doc View Source

    Channel

    Gets the associated channel.

    Declaration
    public Task<DiscordChannel> Channel { get; }
    Property Value
    Type Description
    System.Threading.Tasks.Task<DiscordChannel>
    | Improve this Doc View Source

    ChannelId

    Gets id of the associated channel id.

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

    CoverImageHash

    Gets this event's cover hash, when applicable.

    Declaration
    public string CoverImageHash { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    CoverImageUrl

    Gets this event's cover in url form.

    Declaration
    public string CoverImageUrl { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Creator

    Gets the user that created the scheduled event.

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

    CreatorId

    Gets the ID of the user that created the scheduled event.

    Declaration
    public ulong CreatorId { get; }
    Property Value
    Type Description
    System.UInt64
    | Improve this Doc View Source

    CreatorMember

    Gets the member that created the scheduled event.

    Declaration
    public DiscordMember CreatorMember { get; }
    Property Value
    Type Description
    DiscordMember
    | Improve this Doc View Source

    Description

    Gets the description of the scheduled event.

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

    EntityId

    Gets id of the entity.

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

    EntityMetadata

    Gets metadata of the entity.

    Declaration
    public DiscordScheduledEventEntityMetadata EntityMetadata { get; }
    Property Value
    Type Description
    DiscordScheduledEventEntityMetadata
    | Improve this Doc View Source

    EntityType

    Gets the entity type.

    Declaration
    public ScheduledEventEntityType EntityType { get; }
    Property Value
    Type Description
    ScheduledEventEntityType
    | Improve this Doc View Source

    Guild

    Gets the guild to which this scheduled event belongs.

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

    GuildId

    Gets the guild id of the associated scheduled event.

    Declaration
    public ulong GuildId { get; }
    Property Value
    Type Description
    System.UInt64
    | Improve this Doc View Source

    Name

    Gets the name of the scheduled event.

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

    ScheduledEndTime

    Gets the scheduled end time of the scheduled event.

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

    ScheduledStartTime

    Gets the scheduled start time of the scheduled event.

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

    Status

    Gets the status of the scheduled event.

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

    UserCount

    Gets the total number of users subscribed to the scheduled event.

    Declaration
    public int UserCount { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    CancelAsync(String)

    Cancels the current scheduled event.

    Declaration
    public async Task<DiscordScheduledEvent> CancelAsync(string reason = null)
    Parameters
    Type Name Description
    System.String reason

    The audit log reason.

    Returns
    Type Description
    System.Threading.Tasks.Task<DiscordScheduledEvent>
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the ManageEvents permission.

    NotFoundException

    Thrown when the event does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Discord is unable to process the request.

    | Improve this Doc View Source

    DeleteAsync(String)

    Deletes a scheduled event.

    Declaration
    public async Task DeleteAsync(string reason = null)
    Parameters
    Type Name Description
    System.String reason

    The audit log reason.

    Returns
    Type Description
    System.Threading.Tasks.Task
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the ManageEvents permission.

    NotFoundException

    Thrown when the event does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Discord is unable to process the request.

    | Improve this Doc View Source

    EndAsync(String)

    Ends the current scheduled event.

    Declaration
    public async Task<DiscordScheduledEvent> EndAsync(string reason = null)
    Parameters
    Type Name Description
    System.String reason

    The audit log reason.

    Returns
    Type Description
    System.Threading.Tasks.Task<DiscordScheduledEvent>
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the ManageEvents permission.

    NotFoundException

    Thrown when the event does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Discord is unable to process the request.

    | Improve this Doc View Source

    Equals(DiscordScheduledEvent)

    Checks whether this DiscordScheduledEvent is equal to another DiscordScheduledEvent.

    Declaration
    public bool Equals(DiscordScheduledEvent e)
    Parameters
    Type Name Description
    DiscordScheduledEvent e

    DiscordScheduledEvent to compare to.

    Returns
    Type Description
    System.Boolean

    Whether the DiscordScheduledEvent is equal to this DiscordScheduledEvent.

    | Improve this Doc View Source

    Equals(Object)

    Checks whether this DiscordScheduledEvent is equal to another object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    Object to compare to.

    Returns
    Type Description
    System.Boolean

    Whether the object is equal to this DiscordScheduledEvent.

    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Gets the hash code for this DiscordScheduledEvent.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    The hash code for this DiscordScheduledEvent.

    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    GetUsersAsync(Nullable<Int32>, Nullable<UInt64>, Nullable<UInt64>, Nullable<Boolean>)

    Gets a list of users RSVP'd to the scheduled event.

    Declaration
    public async Task<IReadOnlyDictionary<ulong, DiscordScheduledEventUser>> GetUsersAsync(int? limit = null, ulong? before = null, ulong? after = null, bool? withMember = null)
    Parameters
    Type Name Description
    System.Nullable<System.Int32> limit

    The limit how many users to receive from the event. Defaults to 100. Max 100.

    System.Nullable<System.UInt64> before

    Get results of DiscordScheduledEventUser before the given snowflake.

    System.Nullable<System.UInt64> after

    Get results of DiscordScheduledEventUser after the given snowflake.

    System.Nullable<System.Boolean> withMember

    Whether to include guild member data.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.UInt64, DiscordScheduledEventUser>>
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the correct permissions.

    NotFoundException

    Thrown when the event does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Discord is unable to process the request.

    | Improve this Doc View Source

    ModifyAsync(Action<ScheduledEventEditModel>)

    Modifies the current scheduled event.

    Declaration
    public async Task ModifyAsync(Action<ScheduledEventEditModel> action)
    Parameters
    Type Name Description
    System.Action<ScheduledEventEditModel> action

    Action to perform on this thread

    Returns
    Type Description
    System.Threading.Tasks.Task
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the ManageEvents permission.

    NotFoundException

    Thrown when the event does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Discord is unable to process the request.

    | Improve this Doc View Source

    StartAsync(String)

    Starts the current scheduled event.

    Declaration
    public async Task<DiscordScheduledEvent> StartAsync(string reason = null)
    Parameters
    Type Name Description
    System.String reason
    Returns
    Type Description
    System.Threading.Tasks.Task<DiscordScheduledEvent>
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the ManageEvents permission.

    NotFoundException

    Thrown when the event does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Discord is unable to process the request.

    Operators

    | Improve this Doc View Source

    Equality(DiscordScheduledEvent, DiscordScheduledEvent)

    Gets whether the two DiscordScheduledEvent objects are equal.

    Declaration
    public static bool operator ==(DiscordScheduledEvent e1, DiscordScheduledEvent e2)
    Parameters
    Type Name Description
    DiscordScheduledEvent e1

    First event to compare.

    DiscordScheduledEvent e2

    Second event to compare.

    Returns
    Type Description
    System.Boolean

    Whether the two events are equal.

    | Improve this Doc View Source

    Inequality(DiscordScheduledEvent, DiscordScheduledEvent)

    Gets whether the two DiscordScheduledEvent objects are not equal.

    Declaration
    public static bool operator !=(DiscordScheduledEvent e1, DiscordScheduledEvent e2)
    Parameters
    Type Name Description
    DiscordScheduledEvent e1

    First event to compare.

    DiscordScheduledEvent e2

    Second event to compare.

    Returns
    Type Description
    System.Boolean

    Whether the two events are not equal.

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems