Class GenericGuildInviteEvent
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.guild.GenericGuildEvent
-
- net.dv8tion.jda.api.events.guild.invite.GenericGuildInviteEvent
-
- All Implemented Interfaces:
GenericEvent
- Direct Known Subclasses:
GuildInviteCreateEvent,GuildInviteDeleteEvent
public class GenericGuildInviteEvent extends GenericGuildEvent
-
-
Constructor Summary
Constructors Constructor Description GenericGuildInviteEvent(JDA api, long responseNumber, String code, GuildChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CategorygetCategory()TheCategorythis invite points to.GuildChannelgetChannel()TheGuildChannelthis invite points to.ChannelTypegetChannelType()TheChannelTypefor of thechannelthis invite points to.StringgetCode()The invite code.StoreChannelgetStoreChannel()TheStoreChannelthis invite points to.TextChannelgetTextChannel()TheTextChannelthis invite points to.StringgetUrl()The invite url.VoiceChannelgetVoiceChannel()TheVoiceChannelthis invite points to.-
Methods inherited from class net.dv8tion.jda.api.events.guild.GenericGuildEvent
getGuild
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
-
-
-
Method Detail
-
getCode
@Nonnull public String getCode()
The invite code.
This can be converted to a url withdiscord.gg/<code>.- Returns:
- The invite code
-
getUrl
@Nonnull public String getUrl()
The invite url.
This uses thehttps://discord.gg/<code>format.- Returns:
- The invite url
-
getChannel
@Nonnull public GuildChannel getChannel()
TheGuildChannelthis invite points to.- Returns:
GuildChannel
-
getChannelType
@Nonnull public ChannelType getChannelType()
TheChannelTypefor of thechannelthis invite points to.- Returns:
ChannelType
-
getTextChannel
@Nonnull public TextChannel getTextChannel()
TheTextChannelthis invite points to.- Returns:
TextChannel- Throws:
IllegalStateException- If this did not happen in a channel of typeChannelType.TEXT- See Also:
getChannel(),getChannelType()
-
getVoiceChannel
@Nonnull public VoiceChannel getVoiceChannel()
TheVoiceChannelthis invite points to.- Returns:
VoiceChannel- Throws:
IllegalStateException- If this did not happen in a channel of typeChannelType.VOICE- See Also:
getChannel(),getChannelType()
-
getStoreChannel
@Nonnull public StoreChannel getStoreChannel()
TheStoreChannelthis invite points to.- Returns:
StoreChannel- Throws:
IllegalStateException- If this did not happen in a channel of typeChannelType.STORE- See Also:
getChannel(),getChannelType()
-
getCategory
@Nonnull public Category getCategory()
TheCategorythis invite points to.- Returns:
Category- Throws:
IllegalStateException- If this did not happen in a channel of typeChannelType.CATEGORY- See Also:
getChannel(),getChannelType()
-
-