Package com.mrivanplays.jdcf
Class MessageEventSubscriber
- java.lang.Object
-
- com.mrivanplays.jdcf.MessageEventSubscriber
-
public final class MessageEventSubscriber extends java.lang.Object
Represents a object, holding data for message event.
-
-
Constructor Summary
Constructors Constructor Description MessageEventSubscriber(net.dv8tion.jda.api.entities.Message message)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull net.dv8tion.jda.api.entities.MessageChannel
getChannel()
Returns theMessageChannel
where theMessage
was sent.@Nullable net.dv8tion.jda.api.entities.Guild
getGuild()
Returns theGuild
if theMessage
was sent in one.@NotNull net.dv8tion.jda.api.JDA
getJda()
Returns theJDA
instance, from where the message event was triggered@Nullable net.dv8tion.jda.api.entities.Member
getMember()
Returns theGuild
Member
which have send theMessage
, if theMessage
was sent in aGuild
.@NotNull net.dv8tion.jda.api.entities.Message
getMessage()
Returns the sentMessage
@Nullable net.dv8tion.jda.api.entities.PrivateChannel
getPrivateChannel()
Returns thePrivateChannel
where theMessage
was sent, if it as sent in one.@Nullable net.dv8tion.jda.api.entities.TextChannel
getTextChannel()
Returns theTextChannel
where theMessage
was sent, if it was sent in aGuild
@NotNull net.dv8tion.jda.api.entities.User
getUser()
Returns theUser
, author of theMessage
boolean
isGuildMessage()
Returns whenever theMessage
was fromGuild
-
-
-
Method Detail
-
isGuildMessage
public boolean isGuildMessage()
Returns whenever theMessage
was fromGuild
- Returns:
true
if from guild,false
otherwise
-
getUser
@NotNull public @NotNull net.dv8tion.jda.api.entities.User getUser()
Returns theUser
, author of theMessage
- Returns:
- author
-
getMember
@Nullable public @Nullable net.dv8tion.jda.api.entities.Member getMember()
Returns theGuild
Member
which have send theMessage
, if theMessage
was sent in aGuild
.- Returns:
- member
-
getGuild
@Nullable public @Nullable net.dv8tion.jda.api.entities.Guild getGuild()
Returns theGuild
if theMessage
was sent in one.- Returns:
- guild
-
getMessage
@NotNull public @NotNull net.dv8tion.jda.api.entities.Message getMessage()
Returns the sentMessage
- Returns:
- message
-
getChannel
@NotNull public @NotNull net.dv8tion.jda.api.entities.MessageChannel getChannel()
Returns theMessageChannel
where theMessage
was sent.- Returns:
- channel
-
getTextChannel
@Nullable public @Nullable net.dv8tion.jda.api.entities.TextChannel getTextChannel()
Returns theTextChannel
where theMessage
was sent, if it was sent in aGuild
- Returns:
- text channel
-
getPrivateChannel
@Nullable public @Nullable net.dv8tion.jda.api.entities.PrivateChannel getPrivateChannel()
Returns thePrivateChannel
where theMessage
was sent, if it as sent in one.- Returns:
- private channel
-
getJda
@NotNull public @NotNull net.dv8tion.jda.api.JDA getJda()
Returns theJDA
instance, from where the message event was triggered- Returns:
- jda
-
-