Search Results for

    Show / Hide Table of Contents

    Class RestMessage

    Represents a REST-based message.

    Inheritance
    Object
    RestEntity<UInt64>
    RestMessage
    RestSystemMessage
    RestUserMessage
    Implements
    IEntity<UInt64>
    IMessage
    ISnowflakeEntity
    IEntity<UInt64>
    IDeletable
    IUpdateable
    Inherited Members
    RestEntity<UInt64>.Id
    Namespace: Discord.Rest
    Assembly: Discord.Net.Rest.dll
    Syntax
    public abstract class RestMessage : RestEntity<ulong>, IEntity<ulong>, IMessage, ISnowflakeEntity, IEntity<ulong>, IDeletable, IUpdateable

    Properties

    | Improve this Doc View Source

    Activity

    Gets the activity associated with a message.

    Declaration
    public MessageActivity Activity { get; }
    Property Value
    Type Description
    MessageActivity

    A message's activity, if any is associated.

    Remarks

    Sent with Rich Presence-related chat embeds. This often refers to activity that requires end-user's interaction, such as a Spotify Invite activity.

    | Improve this Doc View Source

    Application

    Gets the application associated with a message.

    Declaration
    public MessageApplication Application { get; }
    Property Value
    Type Description
    MessageApplication

    A message's application, if any is associated.

    Remarks

    Sent with Rich-Presence-related chat embeds.

    | Improve this Doc View Source

    Attachments

    Gets a collection of the Attachment's on the message.

    Declaration
    public virtual IReadOnlyCollection<Attachment> Attachments { get; }
    Property Value
    Type Description
    IReadOnlyCollection<Attachment>
    | Improve this Doc View Source

    Author

    Gets the Author of the message.

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

    Channel

    Gets the source channel of the message.

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

    CleanContent

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

    Components

    Declaration
    public IReadOnlyCollection<ActionRowComponent> Components { get; }
    Property Value
    Type Description
    IReadOnlyCollection<ActionRowComponent>
    | Improve this Doc View Source

    Content

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

    CreatedAt

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

    EditedTimestamp

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

    Embeds

    Gets a collection of the Embed's on the message.

    Declaration
    public virtual IReadOnlyCollection<Embed> Embeds { get; }
    Property Value
    Type Description
    IReadOnlyCollection<Embed>
    | Improve this Doc View Source

    Flags

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

    Interaction

    Gets the interaction this message is a response to.

    Declaration
    public MessageInteraction<RestUser> Interaction { get; }
    Property Value
    Type Description
    MessageInteraction<RestUser>
    | Improve this Doc View Source

    IsPinned

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

    IsSuppressed

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

    IsTTS

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

    MentionedChannelIds

    Declaration
    public virtual IReadOnlyCollection<ulong> MentionedChannelIds { get; }
    Property Value
    Type Description
    IReadOnlyCollection<UInt64>
    | Improve this Doc View Source

    MentionedEveryone

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

    MentionedRoleIds

    Declaration
    public virtual IReadOnlyCollection<ulong> MentionedRoleIds { get; }
    Property Value
    Type Description
    IReadOnlyCollection<UInt64>
    | Improve this Doc View Source

    MentionedUsers

    Gets a collection of the mentioned users in the message.

    Declaration
    public IReadOnlyCollection<RestUser> MentionedUsers { get; }
    Property Value
    Type Description
    IReadOnlyCollection<RestUser>
    | Improve this Doc View Source

    Reactions

    Declaration
    public IReadOnlyDictionary<IEmote, ReactionMetadata> Reactions { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<IEmote, ReactionMetadata>
    | Improve this Doc View Source

    Reference

    Gets the reference to the original message if it is a crosspost, channel follow add, pin, or reply message.

    Declaration
    public MessageReference Reference { get; }
    Property Value
    Type Description
    MessageReference

    A message's reference, if any is associated.

    Remarks

    Sent with cross-posted messages, meaning they were published from news channels and received by subscriber channels, channel follow adds, pins, and message replies.

    | Improve this Doc View Source

    Source

    Gets the source type of this message.

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

    Stickers

    Declaration
    public virtual IReadOnlyCollection<StickerItem> Stickers { get; }
    Property Value
    Type Description
    IReadOnlyCollection<StickerItem>
    | Improve this Doc View Source

    Tags

    Declaration
    public virtual IReadOnlyCollection<ITag> Tags { get; }
    Property Value
    Type Description
    IReadOnlyCollection<ITag>
    | Improve this Doc View Source

    Timestamp

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

    Type

    Gets the type of this message.

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

    Methods

    | Improve this Doc View Source

    AddReactionAsync(IEmote, RequestOptions)

    Declaration
    public Task AddReactionAsync(IEmote emote, RequestOptions options = null)
    Parameters
    Type Name Description
    IEmote emote
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    DeleteAsync(RequestOptions)

    Declaration
    public Task DeleteAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    GetReactionUsersAsync(IEmote, Int32, RequestOptions)

    Declaration
    public IAsyncEnumerable<IReadOnlyCollection<IUser>> GetReactionUsersAsync(IEmote emote, int limit, RequestOptions options = null)
    Parameters
    Type Name Description
    IEmote emote
    Int32 limit
    RequestOptions options
    Returns
    Type Description
    IAsyncEnumerable<IReadOnlyCollection<IUser>>
    | Improve this Doc View Source

    RemoveAllReactionsAsync(RequestOptions)

    Declaration
    public Task RemoveAllReactionsAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    RemoveAllReactionsForEmoteAsync(IEmote, RequestOptions)

    Declaration
    public Task RemoveAllReactionsForEmoteAsync(IEmote emote, RequestOptions options = null)
    Parameters
    Type Name Description
    IEmote emote
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    RemoveReactionAsync(IEmote, IUser, RequestOptions)

    Declaration
    public Task RemoveReactionAsync(IEmote emote, IUser user, RequestOptions options = null)
    Parameters
    Type Name Description
    IEmote emote
    IUser user
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    RemoveReactionAsync(IEmote, UInt64, RequestOptions)

    Declaration
    public Task RemoveReactionAsync(IEmote emote, ulong userId, RequestOptions options = null)
    Parameters
    Type Name Description
    IEmote emote
    UInt64 userId
    RequestOptions options
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    ToString()

    Gets the Content of the message.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that is the Content of the message.

    | Improve this Doc View Source

    UpdateAsync(RequestOptions)

    Declaration
    public async Task UpdateAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task

    Explicit Interface Implementations

    | Improve this Doc View Source

    IMessage.Author

    Declaration
    IUser IMessage.Author { get; }
    Returns
    Type Description
    IUser
    | Improve this Doc View Source

    IMessage.Interaction

    Gets the interaction this message is a response to.

    Declaration
    IMessageInteraction IMessage.Interaction { get; }
    Returns
    Type Description
    IMessageInteraction

    A IMessageInteraction if the message is a response to an interaction; otherwise null.

    Implements

    IEntity<TId>
    IMessage
    ISnowflakeEntity
    IEntity<TId>
    IDeletable
    IUpdateable

    Theme

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