Search Results for

    Show / Hide Table of Contents

    Class KuracordMessage

    Represents a Kuracord text message.

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

    Properties

    | Improve this Doc View Source

    Attachments

    Gets files attached to this message.

    Declaration
    public IReadOnlyList<KuracordAttachment> Attachments { get; }
    Property Value
    Type Description
    IReadOnlyList<KuracordAttachment>
    | Improve this Doc View Source

    Author

    Gets the user that sent the message.

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

    Channel

    Gets the channel in which the message was sent.

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

    ChannelId

    Gets the ID of the channel in which the message was sent.

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

    Content

    Gets the message's content.

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

    EditedTimestamp

    Gets the message's edit timestamp. Will be null if the message was not edited.

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

    Guild

    Gets the guild in which the message was sent.

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

    IsEdited

    Gets whether this message was edited.

    Declaration
    public bool IsEdited { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Member

    Gets the member that sent the message.

    Declaration
    public KuracordMember Member { get; }
    Property Value
    Type Description
    KuracordMember

    Methods

    | Improve this Doc View Source

    DeleteAsync()

    Deletes a message.

    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

    Equals(KuracordMessage)

    Checks whether this KuracordMessage is equal to another KuracordMessage.

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

    KuracordMessage to compare to.

    Returns
    Type Description
    Boolean

    Whether the KuracordMessage is equal to this KuracordMessage.

    | Improve this Doc View Source

    Equals(Object)

    Checks whether this KuracordMessage 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 KuracordMessage.

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

    GetHashCode()

    Gets the hash code for this KuracordMessage.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The hash code for this KuracordMessage.

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

    ModifyAsync(String)

    Edits the message.

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

    New content.

    Returns
    Type Description
    Task<KuracordMessage>

    Modified 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

    ToString()

    Returns a string representation of this message.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    String representation of this message.

    Overrides
    Object.ToString()

    Operators

    | Improve this Doc View Source

    Equality(KuracordMessage, KuracordMessage)

    Gets whether the two KuracordMessage objects are equal.

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

    First message to compare.

    KuracordMessage e2

    Second message to compare.

    Returns
    Type Description
    Boolean

    Whether the two messages are equal.

    | Improve this Doc View Source

    Inequality(KuracordMessage, KuracordMessage)

    Gets whether the two KuracordMessage objects are not equal.

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

    First message to compare.

    KuracordMessage e2

    Second message to compare.

    Returns
    Type Description
    Boolean

    Whether the two messages are not equal.

    Implements

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