Skip to content

Inherits
Object

Class Message

Represents a message.

Properties


Id

Gets the unique id of the message
Declaration

public int Id {get; }

Property Value

Type Description
Int32 The unique id.

Author

Gets the author of the message.
Declaration

public User Author {get; }

Property Value

Type Description
User The user that sent the message.

Channel

Gets the message's channel.
Declaration

public Channel Channel {get; }

Property Value

Type Description
Channel Channel where the message is.

Guild

Gets the guild that the message belongs to, if applicable
Declaration

public Guild Guild {get; }

Property Value

Type Description
Guild Guild where the message is or null.

Content

Gets the content of the message.
Declaration

public string Content {get; }

Property Value

Type Description
String

CreatedAt

Gets the date the message was sent.
Declaration

public DateTime CreatedAt {get; }

Property Value

Type Description
DateTime The date and time the message was sent in UTC.

EditedAt

Gets the time when the message was edited
Declaration

public DateTime EditedAt {get; }

Property Value

Type Description
DateTime The time when it was edited or null if not edited.

Methods


Pin()

Pins a message.
Declaration

public bool Pin()

Returns

Type Description
Boolean true if it was pinned successfully, false otherwise.

Unpin()

Unpins a message.
Declaration

public bool Unpin()

Returns

Type Description
Boolean true if it was unpinned successfully, false otherwise.