Package net.dv8tion.jda.api.entities
Interface IInviteContainer
-
- All Superinterfaces:
Channel,Comparable<GuildChannel>,Formattable,GuildChannel,IMentionable,ISnowflake
- All Known Subinterfaces:
BaseGuildMessageChannel,NewsChannel,StageChannel,TextChannel,VoiceChannel
public interface IInviteContainer extends GuildChannel
Represents aGuildChannelthat can be the target of a Guild's invite. Invites have to be targeted at exactly oneIInviteContainer, which will open when the invite is used (unless restricted by permissions).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InviteActioncreateInvite()Creates a newInviteActionwhich can be used to create a newInvite.RestAction<List<Invite>>retrieveInvites()Returns all invites for this channel.-
Methods inherited from interface net.dv8tion.jda.api.entities.Channel
formatTo, getAsMention, getJDA, getName, getType
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface net.dv8tion.jda.api.entities.GuildChannel
delete, getGuild, getManager, getPermissionContainer
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Method Detail
-
createInvite
@Nonnull @CheckReturnValue InviteAction createInvite()
Creates a newInviteActionwhich can be used to create a newInvite.
RequiresCREATE_INSTANT_INVITEin this channel.- Returns:
- A new
InviteAction - Throws:
InsufficientPermissionException- If the account does not haveCREATE_INSTANT_INVITEin this channelIllegalArgumentException- If this is an instance of aCategory- See Also:
InviteAction
-
retrieveInvites
@Nonnull @CheckReturnValue RestAction<List<Invite>> retrieveInvites()
Returns all invites for this channel.
RequiresMANAGE_CHANNELin this channel. Will throw anInsufficientPermissionExceptionotherwise.- Returns:
RestAction- Type: List<Invite>
The list of expanded Invite objects- Throws:
InsufficientPermissionException- if the account does not haveMANAGE_CHANNELin this channel- See Also:
Guild.retrieveInvites()
-
-