public class PinsUpdateEvent extends ChannelEvent
This event is dispatched by Discord.
Constructor and Description |
---|
PinsUpdateEvent(DiscordClient client,
long channelId,
Instant lastPinTimestamp) |
Modifier and Type | Method and Description |
---|---|
Mono<MessageChannel> |
getChannel()
Requests to retrieve the
MessageChannel the pinned/unpinned
Message is in. |
Snowflake |
getChannelId()
|
Optional<Instant> |
getLastPinTimestamp()
Gets the ISO8601 timestamp of when the last pinned
Message w
as pinned, if present. |
String |
toString() |
public PinsUpdateEvent(DiscordClient client, long channelId, @Nullable Instant lastPinTimestamp)
public Snowflake getChannelId()
MessageChannel
involved.public Mono<MessageChannel> getChannel()
MessageChannel
the pinned/unpinned
Message
is in.Mono
where, upon successful completion, emits the MessageChannel
involved.
If an error is received, it is emitted through the Mono
.public Optional<Instant> getLastPinTimestamp()
Message
w
as pinned, if present. This is NOT the timestamp of when the Message
was created.Message
was pinned,
if present.