Class GenericMessageEvent

    • Constructor Detail

      • GenericMessageEvent

        public GenericMessageEvent​(@Nonnull
                                   JDA api,
                                   long responseNumber,
                                   long messageId,
                                   @Nonnull
                                   MessageChannel channel)
    • Method Detail

      • getMessageId

        @Nonnull
        public java.lang.String getMessageId()
        The id for this message
        Returns:
        The id for this message
      • getMessageIdLong

        public long getMessageIdLong()
        The id for this message
        Returns:
        The id for this message
      • isFromType

        public boolean isFromType​(@Nonnull
                                  ChannelType type)
        Indicates whether the message is from the specified ChannelType
        Parameters:
        type - The ChannelType
        Returns:
        True, if the message is from the specified channel type
      • isFromGuild

        public boolean isFromGuild()
        Whether this message was sent in a Guild.
        If this is false then getGuild() will throw an IllegalStateException.
        Returns:
        True, if getChannelType().isGuild() is true.
      • getChannelType

        @Nonnull
        public ChannelType getChannelType()
        The ChannelType for this message
        Returns:
        The ChannelType