Class PinsUpdateEvent


  • public class PinsUpdateEvent
    extends ChannelEvent
    Dispatched when a message is pinned or unpinned in a message channel.

    This event is dispatched by Discord.

    See Also:
    Channel Pins Update
    • Method Detail

      • getGuildId

        public Optional<Snowflake> getGuildId()
        Gets the Snowflake ID of the Guild the pinned/unpinned Message is in, if this happened in a guild. This may not be available if the Message is in a private channel.
        Returns:
        The ID of the Guild involved, if present.
      • getGuild

        public Mono<Guild> getGuild()
        Requests to retrieve the Guild the pinned/unpinned Message is in, if this happened in a guild. This may not be available if the Message is in a private channel.
        Returns:
        A Mono where, upon successful completion, emits the Guild containing the Message involved, if present. If an error is received, it is emitted through the Mono.
      • getLastPinTimestamp

        public Optional<Instant> getLastPinTimestamp()
        Gets the ISO8601 timestamp of when the last pinned Message w as pinned, if present. This is NOT the timestamp of when the Message was created.
        Returns:
        The timestamp of the when the last pinned Message was pinned, if present.