Class GenericChannelEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.channel.GenericChannelEvent
- All Implemented Interfaces:
GenericEvent
- Direct Known Subclasses:
ChannelCreateEvent,ChannelDeleteEvent,GenericChannelUpdateEvent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGuild()TheGuildin which this channel event happened.booleanWhether this channel event happened in aGuild.booleanisFromType(ChannelType type) Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
Constructor Details
-
GenericChannelEvent
-
-
Method Details
-
isFromGuild
public boolean isFromGuild()Whether this channel event happened in aGuild.
If this isfalsethengetGuild()will throw anIllegalStateException.- Returns:
- True, if
getChannelType().isGuild()is true.
-
getChannelType
-
isFromType
-
getChannel
-
getGuild
TheGuildin which this channel event happened.
If this channel event was not received in aTextChannel, this will throw anIllegalStateException.- Returns:
- The Guild in which this channel event happened
- Throws:
IllegalStateException- If this channel event did not happen in aGuildChannel.- See Also:
-