Package net.dv8tion.jda.bot
Interface JDABot
-
public interface JDABot
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RestAction<ApplicationInfo>
getApplicationInfo()
Retrieves theApplicationInfo
for the application that owns the logged in Bot-Account.java.lang.String
getInviteUrl(java.util.Collection<Permission> permissions)
Creates an authorization invite url for the currently logged in Bot-Account.java.lang.String
getInviteUrl(Permission... permissions)
Creates an authorization invite url for the currently logged in Bot-Account.JDA
getJDA()
Returns theJDA
instance of this JDABotShardManager
getShardManager()
Returns theShardManager
that manages this JDA instances or null if this instance is not managed by anyShardManager
.
-
-
-
Method Detail
-
getApplicationInfo
@CheckReturnValue RestAction<ApplicationInfo> getApplicationInfo()
Retrieves theApplicationInfo
for the application that owns the logged in Bot-Account.
This contains information about the owner of the currently logged in bot account!- Returns:
RestAction
- Type:ApplicationInfo
TheApplicationInfo
of the bot's application.
-
getInviteUrl
java.lang.String getInviteUrl(Permission... permissions)
Creates an authorization invite url for the currently logged in Bot-Account.
Example Format:https://discordapp.com/oauth2/authorize?scope=bot&client_id=288202953599221761&permissions=8
Hint: To enable a pre-selected Guild of choice append the parameter
&guild_id=YOUR_GUILD_ID
- Parameters:
permissions
- The permissions to use in your invite, these can be changed by the link user.
If no permissions are provided thepermissions
parameter is omitted- Returns:
- A valid OAuth2 invite url for the currently logged in Bot-Account
-
getInviteUrl
java.lang.String getInviteUrl(java.util.Collection<Permission> permissions)
Creates an authorization invite url for the currently logged in Bot-Account.
Example Format:https://discordapp.com/oauth2/authorize?scope=bot&client_id=288202953599221761&permissions=8
Hint: To enable a pre-selected Guild of choice append the parameter
&guild_id=YOUR_GUILD_ID
- Parameters:
permissions
- The permissions to use in your invite, these can be changed by the link user.
If no permissions are provided thepermissions
parameter is omitted- Returns:
- A valid OAuth2 invite url for the currently logged in Bot-Account
-
getShardManager
ShardManager getShardManager()
Returns theShardManager
that manages this JDA instances or null if this instance is not managed by anyShardManager
.- Returns:
- The corresponding ShardManager or
null
if there is no such manager
-
-