public class MessageReceivedEvent extends GenericMessageEvent
MessageChannel
.
TextChannel
,
PrivateChannel
and Group
!
Can be used to detect that a Message is received in either a guild, private channel or group. Providing a MessageChannel and Message.
Constructor | Description |
---|---|
MessageReceivedEvent(JDA api,
long responseNumber,
Message message) |
Modifier and Type | Method | Description |
---|---|---|
User |
getAuthor() |
The Author of the Message received as
User object. |
Member |
getMember() |
The Author of the Message received as
Member object. |
Message |
getMessage() |
The received
Message object. |
boolean |
isWebhookMessage() |
Whether or not the Message received was sent via a Webhook.
|
getJDA, getResponseNumber
getChannel, getChannelType, getGroup, getGuild, getMessageId, getMessageIdLong, getPrivateChannel, getTextChannel, isFromType
public Message getMessage()
Message
object.Message
object.public User getAuthor()
User
object.
isWebhookMessage()
,
IFakeable.isFake()
public Member getMember()
Member
object.
null
in case of Message being received in
a PrivateChannel
,
a Group
or isWebhookMessage()
returning true
.isWebhookMessage()
public boolean isWebhookMessage()
getMessage().isWebhookMessage()
.