Class GenericGuildMessageEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.guild.GenericGuildEvent
-
- net.dv8tion.jda.api.events.message.guild.GenericGuildMessageEvent
-
- All Implemented Interfaces:
GenericEvent
- Direct Known Subclasses:
GenericGuildMessageReactionEvent,GuildMessageDeleteEvent,GuildMessageEmbedEvent,GuildMessageReactionRemoveAllEvent,GuildMessageReactionRemoveEmoteEvent,GuildMessageReceivedEvent,GuildMessageUpdateEvent
public abstract class GenericGuildMessageEvent extends GenericGuildEvent
Indicates that aMessageevent is fired from aTextChannel.
Every GuildMessageEvent is derived from this event and can be casted.Can be used to detect any GuildMessageEvent.
Requirements
These events require the
GUILD_MESSAGESintent to be enabled.
-
-
Constructor Summary
Constructors Constructor Description GenericGuildMessageEvent(JDA api, long responseNumber, long messageId, TextChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextChannelgetChannel()TheTextChannelfor this messagejava.lang.StringgetMessageId()The message idlonggetMessageIdLong()The message id-
Methods inherited from class net.dv8tion.jda.api.events.guild.GenericGuildEvent
getGuild
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
-
-
-
Constructor Detail
-
GenericGuildMessageEvent
public GenericGuildMessageEvent(@Nonnull JDA api, long responseNumber, long messageId, @Nonnull TextChannel channel)
-
-
Method Detail
-
getMessageId
@Nonnull public java.lang.String getMessageId()
The message id- Returns:
- The message id
-
getMessageIdLong
public long getMessageIdLong()
The message id- Returns:
- The message id
-
getChannel
@Nonnull public TextChannel getChannel()
TheTextChannelfor this message- Returns:
- The TextChannel for this message
-
-