DiscordMessage class
Constructors
-
DiscordMessage({required DiscordSnowflake id, DiscordSnowflake? channelId, DiscordSnowflake? guildId, required DiscordUser author, DiscordGuildMember? member, required String content, required String timestamp, String? editedTimestamp, required bool tts, required bool mentionEveryone, required List<DiscordUser> mentions, required List<String> mentionRoles, List<DiscordChannelMention>? mentionChannels, required List<DiscordAttachment> attachments, required List<DiscordEmbed> embeds, List<DiscordReaction>? reactions, String? nonce, required bool pinned, DiscordSnowflake? webhookId, required int type, DiscordMessageActivity? activity, DiscordApplication? application, DiscordSnowflake? applicationId, DiscordMessageReference? messageReference, required bool isReferencedMessageReturned, int? flags, DiscordMessage? referencedMessage, DiscordMessageInteraction? interaction, DiscordChannel? thread, List<DiscordMessageComponent>? components, List<DiscordStickerItem>? stickerItems, @Deprecated("Use stickerItems instead") List<DiscordSticker>? stickers})
-
-
DiscordMessage.fromJson(Map<String, dynamic> json)
-
factory
Properties
-
activity
→ DiscordMessageActivity?
-
sent with Rich Presence-related chat embeds
final
-
application
→ DiscordApplication?
-
sent with Rich Presence-related chat embeds
final
-
applicationId
→ DiscordSnowflake?
-
if the message is an Interaction
or application-owned webh]ook, this is the id of the application
final
-
attachments
→ List<DiscordAttachment>
-
any attached files
final
-
author
→ DiscordUser
-
the author of this message (not guaranteed to be a vlid user, see below)
final
-
channelId
→ DiscordSnowflake?
-
id of the channel the message was sent in
final
-
components
→ List<DiscordMessageComponent>?
-
sent if the message contains components like buttons,
action rows, or other interactive components
final
-
content
→ String
-
contents of the message
final
-
editedTimestamp
→ String?
-
when this message edited (or null if never),
as an ISO 8601 datetime string
final
-
editedTimestampAsDateTime
→ DateTime?
-
no setter
-
embeds
→ List<DiscordEmbed>
-
any embedded content
final
-
flags
→ int?
-
message flags
combined as a bitfield
final
-
flagsAsEnum
→ List<DiscordMessageFlag>
-
no setter
-
guildId
→ DiscordSnowflake?
-
id of the guild the message was sent in
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
id
→ DiscordSnowflake
-
id of the message
final
-
interaction
→ DiscordMessageInteraction?
-
sent if the message is a response to an Interaction
final
-
isReferencedMessageReturned
→ bool
-
local boolean that's set to true if referencedMessage was returned,
to distinguish between the not existant field and the null field
final
-
member
→ DiscordGuildMember?
-
member properties for this message's author
final
-
mentionChannels
→ List<DiscordChannelMention>?
-
channels specifically mentioned in this message
final
-
mentionEveryone
→ bool
-
whether this message mentions everyone
final
-
mentionRoles
→ List<String>
-
roles specifically mentioned in this message
final
-
mentions
→ List<DiscordUser>
-
users specifically mentioned in this message*
final
-
messageReference
→ DiscordMessageReference?
-
data showing the source of a crosspost, channel follow
add, pin, or reply message
final
-
nonce
→ String?
-
user for validating a message was sent
final
-
pinned
→ bool
-
whether this message is pinned
final
-
reactions
→ List<DiscordReaction>?
-
reactions to the message
final
-
referencedMessage
→ DiscordMessage?
-
the message associated with the message_reference
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
stickerItems
→ List<DiscordStickerItem>?
-
sent if the message contains stickers
final
-
stickers
→ List<DiscordSticker>?
-
Deprecated the stickers sent with the message
final
-
thread
→ DiscordChannel?
-
the thread that was started from this message, includes thread member
object
final
-
timestamp
→ String
-
when this message was sent,
as an ISO 8601 datetime string
final
-
timestampAsDateTime
→ DateTime
-
no setter
-
tts
→ bool
-
whether this was a TTS message
final
-
type
→ int
-
type of message
final
-
typeAsEnum
→ DiscordMessageType
-
no setter
-
webhookId
→ DiscordSnowflake?
-
if the message is generated by a webhook, this is the webhook's id
final
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toString()
→ String
-
A string representation of this object.
inherited