Class GenericPrivateMessageEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.message.priv.GenericPrivateMessageEvent
-
- All Implemented Interfaces:
GenericEvent
- Direct Known Subclasses:
GenericPrivateMessageReactionEvent
,PrivateMessageDeleteEvent
,PrivateMessageEmbedEvent
,PrivateMessageReceivedEvent
,PrivateMessageUpdateEvent
public abstract class GenericPrivateMessageEvent extends Event
Indicates that aMessage
event is fired from aPrivateChannel
.
Every PrivateMessageEvent is an instance of this event and can be casted.Can be used to detect any PrivateMessageEvent.
Requirements
These events require the
DIRECT_MESSAGES
intent to be enabled.
-
-
Constructor Summary
Constructors Constructor Description GenericPrivateMessageEvent(JDA api, long responseNumber, long messageId, PrivateChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PrivateChannel
getChannel()
ThePrivateChannel
for the messagejava.lang.String
getMessageId()
The id for this messagelong
getMessageIdLong()
The id for this message-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
-
-
-
Constructor Detail
-
GenericPrivateMessageEvent
public GenericPrivateMessageEvent(@Nonnull JDA api, long responseNumber, long messageId, @Nonnull PrivateChannel channel)
-
-
Method Detail
-
getChannel
@Nonnull public PrivateChannel getChannel()
ThePrivateChannel
for the message- Returns:
- The PrivateChannel
-
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
-
-