Package com.mrivanplays.jdcf
Class MessageEventSubscriber
- java.lang.Object
-
- com.mrivanplays.jdcf.MessageEventSubscriber
-
public final class MessageEventSubscriber extends java.lang.ObjectRepresents 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.MessageChannelgetChannel()Returns theMessageChannelwhere theMessagewas sent.@Nullable net.dv8tion.jda.api.entities.GuildgetGuild()Returns theGuildif theMessagewas sent in one.@NotNull net.dv8tion.jda.api.JDAgetJda()Returns theJDAinstance, from where the message event was triggered@Nullable net.dv8tion.jda.api.entities.MembergetMember()Returns theGuildMemberwhich have send theMessage, if theMessagewas sent in aGuild.@NotNull net.dv8tion.jda.api.entities.MessagegetMessage()Returns the sentMessage@Nullable net.dv8tion.jda.api.entities.PrivateChannelgetPrivateChannel()Returns thePrivateChannelwhere theMessagewas sent, if it as sent in one.@Nullable net.dv8tion.jda.api.entities.TextChannelgetTextChannel()Returns theTextChannelwhere theMessagewas sent, if it was sent in aGuild@NotNull net.dv8tion.jda.api.entities.UsergetUser()Returns theUser, author of theMessagebooleanisGuildMessage()Returns whenever theMessagewas fromGuild
-
-
-
Method Detail
-
isGuildMessage
public boolean isGuildMessage()
Returns whenever theMessagewas fromGuild- Returns:
trueif from guild,falseotherwise
-
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 theGuildMemberwhich have send theMessage, if theMessagewas sent in aGuild.- Returns:
- member
-
getGuild
@Nullable public @Nullable net.dv8tion.jda.api.entities.Guild getGuild()
Returns theGuildif theMessagewas 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 theMessageChannelwhere theMessagewas sent.- Returns:
- channel
-
getTextChannel
@Nullable public @Nullable net.dv8tion.jda.api.entities.TextChannel getTextChannel()
Returns theTextChannelwhere theMessagewas sent, if it was sent in aGuild- Returns:
- text channel
-
getPrivateChannel
@Nullable public @Nullable net.dv8tion.jda.api.entities.PrivateChannel getPrivateChannel()
Returns thePrivateChannelwhere theMessagewas sent, if it as sent in one.- Returns:
- private channel
-
getJda
@NotNull public @NotNull net.dv8tion.jda.api.JDA getJda()
Returns theJDAinstance, from where the message event was triggered- Returns:
- jda
-
-