MessageManager class
A manager for Messages in a TextChannel.
- Inheritance
-
- Object
- ReadOnlyManager<
Message> - Manager<
Message> - MessageManager
Constructors
-
MessageManager(CacheConfig<
Message> config, NyxxRest 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 → NyxxRest
-
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.
-
fetch(
Snowflake id) → Future< Message> -
Fetch the item with the given
id
from the API.override -
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.
-
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 -
parseAttachment(
Map< String, Object?> raw) → Attachment -
parseChannelMention(
Map< String, Object?> raw) → ChannelMention -
parseEmbed(
Map< String, Object?> raw) → Embed -
parseEmbedAuthor(
Map< String, Object?> raw) → EmbedAuthor -
parseEmbedField(
Map< String, Object?> raw) → EmbedField -
parseEmbedImage(
Map< String, Object?> raw) → EmbedImage -
parseEmbedProvider(
Map< String, Object?> raw) → EmbedProvider -
parseEmbedThumbnail(
Map< String, Object?> raw) → EmbedThumbnail -
parseEmbedVideo(
Map< String, Object?> raw) → EmbedVideo -
parseMessageActivity(
Map< String, Object?> raw) → MessageActivity -
parseMessageComponent(
Map< String, Object?> raw) → MessageComponent -
parseMessageInteraction(
Map< String, Object?> raw, {Snowflake? guildId}) → MessageInteraction -
parseMessageInteractionMetadata(
Map< String, Object?> raw) → MessageInteractionMetadata -
parseMessageReference(
Map< String, Object?> raw) → MessageReference -
parseReaction(
Map< String, Object?> raw) → Reaction -
parseReactionCountDetails(
Map< String, Object?> raw) → ReactionCountDetails -
parseRoleSubscriptionData(
Map< String, Object?> raw) → RoleSubscriptionData -
parseSelectMenuDefaultValue(
Map< String, Object?> raw) → SelectMenuDefaultValue -
parseSelectMenuOption(
Map< String, Object?> raw) → SelectMenuOption -
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