MessageManager class Managers

A manager for Messages in a TextChannel.

Inheritance

Constructors

MessageManager(CacheConfig<Message> config, UhxxRest client, {required Snowflake channelId})
Create a new MessageManager.

Properties

cache → Cache<Message>
The cache for this manager.
finalinherited
channelId → Snowflake
The ID of the TextChannel this manager is attached to.
final
client → UhxxRest
The client this manager belongs to.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addReaction(Snowflake id, ReactionBuilder emoji) → Future<void>
Adds a reaction to a message.
bulkDelete(Iterable<Snowflake> ids, {String? auditLogReason}) → Future<void>
Bulk delete many messages at once
create(covariant MessageBuilder builder) → Future<Message>
Create a new instance of the type of this manager.
override
crosspost(Snowflake id) → Future<Message>
Crosspost a message to all channels following the channel it was sent in.
delete(Snowflake id, {String? auditLogReason}) → Future<void>
Delete the item with the given id from the API.
override
deleteAllReactions(Snowflake id) → Future<void>
Deletes all reactions on a message.
deleteOwnReaction(Snowflake id, ReactionBuilder emoji) → Future<void>
Deletes our own reaction from a message.
deleteReaction(Snowflake id, ReactionBuilder emoji) → Future<void>
Deletes all reactions for a given emoji on a message.
deleteReactionForUser(Snowflake id, Snowflake userId, ReactionBuilder emoji) → Future<void>
Deletes all reactions for a given emoji on a message.
endPoll(Snowflake id) → Future<Message>
Immediately ends the poll.
fetch(Snowflake id) → Future<Message>
Fetch the item with the given id from the API.
override
fetchAnswerVoters(Snowflake id, int answerId, {Snowflake? after, int? limit}) → Future<List<User>>
Get a list of users that voted for this specific answer.
fetchMany({Snowflake? around, Snowflake? before, Snowflake? after, int? limit}) → Future<List<Message>>
Fetch multiple messages in this channel.
fetchReactions(Snowflake id, ReactionBuilder emoji, {Snowflake? after, int? limit}) → Future<List<User>>
Get a list of users that reacted with a given emoji on a message.
get(Snowflake id) → Future<Message>
Get an item by its id from the cache if it exists, else fetch it from the API.
inherited
getPins() → Future<List<Message>>
Get the pinned messages in the channel.
listPins({DateTime? before, int? limit}) → Future<PinList>
Retrieves the list of pins in a channel. Requires the Permissions.viewChannel permission. If the user is missing the Permissions.readMessageHistory permission in the channel, then no pins will be returned.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(Map<String, Object?> raw, {Snowflake? guildId}) → Message
Parse the raw data received from the API into an instance of the type of this manager.
override
parseActionRowComponent(Map<String, Object?> raw) → ActionRowComponent
parseAttachment(Map<String, Object?> raw) → Attachment
parseButtonComponent(Map<String, Object?> raw) → ButtonComponent
parseChannelMention(Map<String, Object?> raw) → ChannelMention
parseComponent(Map<String, Object?> raw) → Component
parseContainerComponent(Map<String, Object?> raw) → ContainerComponent
parseEmbed(Map<String, Object?> raw) → Embed
parseEmbedAuthor(Map<String, Object?> raw) → EmbedAuthor
parseEmbedField(Map<String, Object?> raw) → EmbedField
parseEmbedFooter(Map<String, Object?> raw) → EmbedFooter
parseEmbedImage(Map<String, Object?> raw) → EmbedImage
parseEmbedProvider(Map<String, Object?> raw) → EmbedProvider
parseEmbedThumbnail(Map<String, Object?> raw) → EmbedThumbnail
parseEmbedVideo(Map<String, Object?> raw) → EmbedVideo
parseFileComponent(Map<String, Object?> raw) → FileComponent
parseFileUploadComponent(Map<String, Object?> raw) → FileUploadComponent
parseMediaGalleryComponent(Map<String, Object?> raw) → MediaGalleryComponent
parseMediaGalleryItem(Map<String, Object?> raw) → MediaGalleryItem
parseMessageActivity(Map<String, Object?> raw) → MessageActivity
parseMessageCall(Map<String, Object?> raw) → MessageCall
parseMessageInteraction(Map<String, Object?> raw, {Snowflake? guildId}) → MessageInteraction
parseMessageInteractionMetadata(Map<String, Object?> raw) → MessageInteractionMetadata
parseMessagePin(Map<String, Object?> raw) → MessagePin
parseMessageReference(Map<String, Object?> raw) → MessageReference
parseMessageSnapshot(Map<String, Object?> raw) → MessageSnapshot
Parse a MessageSnapshot from raw.
parsePinList(Map<String, Object?> raw) → PinList
parsePoll(Map<String, Object?> raw) → Poll
parsePollAnswer(Map<String, Object?> raw) → PollAnswer
parsePollAnswerCount(Map<String, Object?> raw) → PollAnswerCount
parsePollMedia(Map<String, Object?> raw) → PollMedia
parsePollResults(Map<String, Object?> raw) → PollResults
parseReaction(Map<String, Object?> raw) → Reaction
parseReactionCountDetails(Map<String, Object?> raw) → ReactionCountDetails
parseRoleSubscriptionData(Map<String, Object?> raw) → RoleSubscriptionData
parseSectionComponent(Map<String, Object?> raw) → SectionComponent
parseSelectMenuComponent(Map<String, Object?> raw, ComponentType type) → SelectMenuComponent
parseSelectMenuDefaultValue(Map<String, Object?> raw) → SelectMenuDefaultValue
parseSelectMenuOption(Map<String, Object?> raw) → SelectMenuOption
parseSeparatorComponent(Map<String, Object?> raw) → SeparatorComponent
parseSubmittedActionRowComponent(Map<String, Object?> raw, {Snowflake? guildId}) → SubmittedActionRowComponent
parseSubmittedCheckboxComponent(Map<String, Object?> raw) → SubmittedCheckboxComponent
parseSubmittedCheckboxGroupComponent(Map<String, Object?> raw) → SubmittedCheckboxGroupComponent
parseSubmittedComponent(Map<String, Object?> raw, {Snowflake? guildId}) → SubmittedComponent
parseSubmittedFileUploadComponent(Map<String, Object?> raw) → SubmittedFileUploadComponent
parseSubmittedLabelComponent(Map<String, Object?> raw, {Snowflake? guildId}) → SubmittedLabelComponent
parseSubmittedRadioGroupComponent(Map<String, Object?> raw) → SubmittedRadioGroupComponent
parseSubmittedSelectMenuComponent(Map<String, Object?> raw, {Snowflake? guildId}) → SubmittedSelectMenuComponent
parseSubmittedTextDisplayComponent(Map<String, Object?> raw) → SubmittedTextDisplayComponent
parseSubmittedTextInputComponent(Map<String, Object?> raw) → SubmittedTextInputComponent
parseTextDisplayComponent(Map<String, Object?> raw) → TextDisplayComponent
parseTextInputComponent(Map<String, Object?> raw) → TextInputComponent
parseThumbnailComponent(Map<String, Object?> raw) → ThumbnailComponent
parseUnfurledMediaItem(Map<String, Object?> raw) → UnfurledMediaItem
pin(Snowflake id, {String? auditLogReason}) → Future<void>
Pin a message in the channel.
toString() → String
A string representation of this object.
inherited
unpin(Snowflake id, {String? auditLogReason}) → Future<void>
Unpin a message in the channel.
update(Snowflake id, covariant MessageUpdateBuilder builder) → Future<Message>
Update the item with the given id in the API.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](Snowflake id) → PartialMessage
Return a partial instance of the entity with ID id containing no data.
override