Search Results for

    Show / Hide Table of Contents

    Class KuracordChannel

    Inheritance
    Object
    SnowflakeObject
    KuracordChannel
    KuracordDmChannel
    Implements
    IEquatable<KuracordChannel>
    Inherited Members
    SnowflakeObject.Id
    SnowflakeObject.CreationTimestamp
    Object.Equals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: KSharpPlus.Entities.Channel
    Assembly: KSharpPlus.dll
    Syntax
    public class KuracordChannel : SnowflakeObject

    Properties

    | Improve this Doc View Source

    Guild

    Gets the guild to which this channel belongs.

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

    GuildId

    Gets ID of the guild to which this channel belongs.

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

    Mention

    Gets this channel's mention string.

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

    Name

    Gets the name of this channel.

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

    Type

    Gets the type of this channel.

    Declaration
    public ChannelType Type { get; }
    Property Value
    Type Description
    ChannelType

    Methods

    | Improve this Doc View Source

    CloneAsync()

    Clones this channel. This operation will create a channel with identical settings to this one. Note that this will not copy messages.

    Declaration
    public Task<KuracordChannel> CloneAsync()
    Returns
    Type Description
    Task<KuracordChannel>

    Newly-created channel.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    DeleteAsync()

    Deletes a channel.

    Declaration
    public Task DeleteAsync()
    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    DeleteMessageAsync(KuracordMessage)

    Deletes a message.

    Declaration
    public Task DeleteMessageAsync(KuracordMessage message)
    Parameters
    Type Name Description
    KuracordMessage message

    The message to be deleted.

    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    DeleteMessageAsync(UInt64)

    Deletes a message.

    Declaration
    public Task DeleteMessageAsync(ulong messageId)
    Parameters
    Type Name Description
    UInt64 messageId

    ID of the message to be deleted.

    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    EditMessageAsync(KuracordMessage, String)

    Edits the message.

    Declaration
    public Task<KuracordMessage> EditMessageAsync(KuracordMessage message, string content)
    Parameters
    Type Name Description
    KuracordMessage message

    The message to edit.

    String content

    New content.

    Returns
    Type Description
    Task<KuracordMessage>

    Edited message.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client tried to modify a message not sent by them.

    NotFoundException

    Thrown when the member does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    EditMessageAsync(UInt64, String)

    Edits the message.

    Declaration
    public Task<KuracordMessage> EditMessageAsync(ulong messageId, string content)
    Parameters
    Type Name Description
    UInt64 messageId

    ID of the message to edit.

    String content

    New content.

    Returns
    Type Description
    Task<KuracordMessage>

    Edited message.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client tried to modify a message not sent by them.

    NotFoundException

    Thrown when the member does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    Equals(KuracordChannel)

    Checks whether this KuracordChannel is equal to another KuracordChannel.

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

    KuracordChannel to compare to.

    Returns
    Type Description
    Boolean

    Whether the KuracordChannel is equal to this KuracordChannel.

    | Improve this Doc View Source

    Equals(Object)

    Checks whether this KuracordChannel is equal to another object.

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

    Object to compare to.

    Returns
    Type Description
    Boolean

    Whether the object is equal to this KuracordChannel.

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

    GetHashCode()

    Gets the hash code for this KuracordChannel.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The hash code for this KuracordChannel.

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

    GetMessageAsync(UInt64, Boolean)

    Returns a specific message.

    Declaration
    public async Task<KuracordMessage> GetMessageAsync(ulong messageId, bool skipCache = false)
    Parameters
    Type Name Description
    UInt64 messageId

    ID of the message to get.

    Boolean skipCache

    Whether to always make a REST request.

    Returns
    Type Description
    Task<KuracordMessage>

    Requested message.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the ViewChannels permission.

    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    GetMessagesAsync(UInt32, Nullable<UInt64>)

    Returns a list of messages from the last message in the channel.

    Declaration
    public Task<IReadOnlyList<KuracordMessage>> GetMessagesAsync(uint limit = 30U, ulong? before = null)
    Parameters
    Type Name Description
    UInt32 limit
    Nullable<UInt64> before
    Returns
    Type Description
    Task<IReadOnlyList<KuracordMessage>>

    A list of messages from the last message in the channel.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the ViewChannels permission.

    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    ModifyAsync(String)

    Modifies a channel.

    Declaration
    public Task<KuracordChannel> ModifyAsync(string name)
    Parameters
    Type Name Description
    String name

    New channel name.

    Returns
    Type Description
    Task<KuracordChannel>

    Modified channel.

    Exceptions
    Type Condition
    UnauthorizedException

    Thrown when the client does not have the Administrator permission.

    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    SendMessageAsync(String)

    Sends a message.

    Declaration
    public Task<KuracordMessage> SendMessageAsync(string content)
    Parameters
    Type Name Description
    String content

    Message content to send.

    Returns
    Type Description
    Task<KuracordMessage>

    The Kuracord Message that was sent.

    Exceptions
    Type Condition
    NotFoundException

    Thrown when the channel does not exist.

    BadRequestException

    Thrown when an invalid parameter was provided.

    ServerErrorException

    Thrown when Kuracord is unable to process the request.

    | Improve this Doc View Source

    ToString()

    Returns a string representation of this channel.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    String representation of this channel.

    Overrides
    Object.ToString()

    Operators

    | Improve this Doc View Source

    Equality(KuracordChannel, KuracordChannel)

    Gets whether the two KuracordChannel objects are equal.

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

    First channel to compare.

    KuracordChannel e2

    Second channel to compare.

    Returns
    Type Description
    Boolean

    Whether the two channels are equal.

    | Improve this Doc View Source

    Inequality(KuracordChannel, KuracordChannel)

    Gets whether the two KuracordChannel objects are not equal.

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

    First channel to compare.

    KuracordChannel e2

    Second channel to compare.

    Returns
    Type Description
    Boolean

    Whether the two channels are not equal.

    Implements

    IEquatable<>
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2023 KSharpPlus Contributors