Class PinsUpdateEvent
java.lang.Object
discord4j.core.event.domain.Event
discord4j.core.event.domain.channel.ChannelEvent
discord4j.core.event.domain.channel.PinsUpdateEvent
Dispatched when a message is pinned or unpinned in a message channel.
This event is dispatched by Discord.
- See Also:
-
Constructor Summary
ConstructorDescriptionPinsUpdateEvent
(GatewayDiscordClient gateway, ShardInfo shardInfo, long channelId, Long guildId, Instant lastPinTimestamp) -
Method Summary
Modifier and TypeMethodDescriptionRequests to retrieve theMessageChannel
the pinned/unpinnedMessage
is in.getGuild()
Gets the ISO8601 timestamp of when the last pinnedMessage
w as pinned, if present.toString()
Methods inherited from class discord4j.core.event.domain.Event
getClient, getShardInfo
-
Constructor Details
-
PinsUpdateEvent
-
-
Method Details
-
getChannelId
- Returns:
- the ID of the
MessageChannel
involved.
-
getChannel
Requests to retrieve theMessageChannel
the pinned/unpinnedMessage
is in.- Returns:
- A
Mono
where, upon successful completion, emits theMessageChannel
involved. If an error is received, it is emitted through theMono
.
-
getGuildId
Gets theSnowflake
ID of theGuild
the pinned/unpinnedMessage
is in, if this happened in a guild. This may not be available if theMessage
is in a private channel.- Returns:
- The ID of the
Guild
involved, if present.
-
getGuild
-
getLastPinTimestamp
Gets the ISO8601 timestamp of when the last pinnedMessage
w as pinned, if present. This is NOT the timestamp of when theMessage
was created.- Returns:
- The timestamp of the when the last pinned
Message
was pinned, if present.
-
toString
-