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
Indicates that an
Every GuildInviteEvent is derived from this event and can be casted.
Invite was created or deleted in a Guild.
Every GuildInviteEvent is derived from this event and can be casted.
Can be used to detect any GuildInviteEvent.
Requirements
These events require the GUILD_INVITES intent to be enabled.
These events will only fire for invite events that occur in channels where you can MANAGE_CHANNEL.
-
Constructor Summary
ConstructorsConstructorDescriptionGenericGuildInviteEvent(JDA api, long responseNumber, String code, GuildChannel channel) -
Method Summary
Modifier and TypeMethodDescriptionTheGuildChannelthis invite points to.TheChannelTypefor of thechannelthis invite points to.getCode()The invite code.getUrl()The invite url.Methods inherited from class net.dv8tion.jda.api.events.guild.GenericGuildEvent
getGuildMethods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getRawData, getResponseNumber, toString
-
Constructor Details
-
GenericGuildInviteEvent
-
-
Method Details
-
getCode
The invite code.
This can be converted to a url withdiscord.gg/<code>.- Returns:
- The invite code
-
getUrl
The invite url.
This uses thehttps://discord.gg/<code>format.- Returns:
- The invite url
-
getChannel
TheGuildChannelthis invite points to.- Returns:
GuildChannel
-
getChannelType
TheChannelTypefor of thechannelthis invite points to.- Returns:
ChannelType
-