Package org.javacord.api
Class BotInviteBuilder
- java.lang.Object
-
- org.javacord.api.BotInviteBuilder
-
public class BotInviteBuilder extends java.lang.ObjectA tool to create bot invites.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBASE_LINKThe base link for a bot application invite link.
-
Constructor Summary
Constructors Constructor Description BotInviteBuilder(long clientId)Creates a new bot invite builder.BotInviteBuilder(java.lang.String clientId)Creates a new bot invite builder.BotInviteBuilder(DiscordApi api)Creates a new bot invite builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BotInviteBuilderaddScopes(java.util.Collection<BotInviteScope> scopes)Adds the scopes for this invite builder.BotInviteBuilderaddScopes(BotInviteScope... scopes)Adds the scopes for this invite builder.java.lang.Stringbuild()Creates the invite link.BotInviteBuildersetPermissions(Permissions permissions)Sets the permissions the bot should have.BotInviteBuildersetPermissions(PermissionType... permissions)Sets the permissions the bot should have.BotInviteBuildersetPromptConsent(boolean promptConsent)Sets whether to append prompt consent to the invite link.BotInviteBuildersetRedirectUri(java.lang.String redirectUri)Sets the redirect uri for this invite builder.BotInviteBuildersetScopes(java.util.Collection<BotInviteScope> scopes)Sets the scopes for this invite builder.BotInviteBuildersetScopes(BotInviteScope... scopes)Sets the scopes for this invite builder.
-
-
-
Field Detail
-
BASE_LINK
public static final java.lang.String BASE_LINK
The base link for a bot application invite link.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BotInviteBuilder
public BotInviteBuilder(long clientId)
Creates a new bot invite builder.- Parameters:
clientId- The client id of the bot's application.
-
BotInviteBuilder
public BotInviteBuilder(java.lang.String clientId)
Creates a new bot invite builder.- Parameters:
clientId- The client id of the bot's application.
-
BotInviteBuilder
public BotInviteBuilder(DiscordApi api)
Creates a new bot invite builder.- Parameters:
api- The Discord API to use.
-
-
Method Detail
-
setPermissions
public BotInviteBuilder setPermissions(Permissions permissions)
Sets the permissions the bot should have.- Parameters:
permissions- The permissions to set.- Returns:
- The current instance in order to chain call methods.
-
setPermissions
public BotInviteBuilder setPermissions(PermissionType... permissions)
Sets the permissions the bot should have.- Parameters:
permissions- The permissions to set.- Returns:
- The current instance in order to chain call methods.
-
setRedirectUri
public BotInviteBuilder setRedirectUri(java.lang.String redirectUri)
Sets the redirect uri for this invite builder.- Parameters:
redirectUri- The redirect uri to set.- Returns:
- The current instance in order to chain call methods.
-
setScopes
public BotInviteBuilder setScopes(java.util.Collection<BotInviteScope> scopes)
Sets the scopes for this invite builder.- Parameters:
scopes- The scopes to set.- Returns:
- The current instance in order to chain call methods.
-
setScopes
public BotInviteBuilder setScopes(BotInviteScope... scopes)
Sets the scopes for this invite builder.- Parameters:
scopes- The scopes to set.- Returns:
- The current instance in order to chain call methods.
-
addScopes
public BotInviteBuilder addScopes(java.util.Collection<BotInviteScope> scopes)
Adds the scopes for this invite builder.- Parameters:
scopes- The scopes to add.- Returns:
- The current instance in order to chain call methods.
-
addScopes
public BotInviteBuilder addScopes(BotInviteScope... scopes)
Adds the scopes for this invite builder.- Parameters:
scopes- The scopes to add.- Returns:
- The current instance in order to chain call methods.
-
setPromptConsent
public BotInviteBuilder setPromptConsent(boolean promptConsent)
Sets whether to append prompt consent to the invite link.- Parameters:
promptConsent- Whether to append prompt consent or not.- Returns:
- The current instance in order to chain call methods.
-
build
public java.lang.String build()
Creates the invite link.- Returns:
- The invite link for the bot.
-
-