MessageReference class
A reference to an external entity contained in a message.
Different message types will have different objects in their Message.reference field.
-
Crosspost messages (messages with MessageFlags.isCrosspost set):
All three fields are present.
-
Pin messages (MessageType.channelPinnedMessage)
All three fields are present, except if the message was pinned outside of a guild, in which case guildId is
null
. -
All three fields are present, except if the message was sent outside of a guild, in which case guildId is
null
. -
Thread Created messages (MessageType.threadCreated)
Only channelId and guildId are present, and point to the newly created thread.
-
Thread starter messages (MessageType.threadStarterMessage)
All three fields are present.
External references:
- Discord API Reference: https://discord.com/developers/docs/resources/channel#message-reference-object
Properties
- channel → PartialChannel
-
The originating message's channel.
no setter
- channelId → Snowflake
-
The ID of the originating message's Channel.
final
- guild → PartialGuild?
-
The guild of the originating message.
no setter
- guildId → Snowflake?
-
The ID of the originating message's Guild.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- manager → MessageManager
-
The manager for this MessageReference.
final
- message → PartialMessage?
-
The originating message.
no setter
- messageId → Snowflake?
-
The ID of the originating Message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
defaultToString(
) → String -
Same as toString, but only called when dart:mirrors is not available.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited