Package dev.projectenhanced.enhancedjda
Class EnhancedBot
java.lang.Object
dev.projectenhanced.enhancedjda.EnhancedBot
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.github.cdimascio.dotenv.Dotenv
Class<?>
getPackageClass
(String packageName) Get main class from package namenet.dv8tion.jda.api.sharding.ShardManager
void
onReady
(net.dv8tion.jda.api.events.session.ReadyEvent event) Method invoked when bot is readyvoid
Method invoked just before shutdownvoid
postBuild
(net.dv8tion.jda.api.sharding.ShardManager shardManager) Method invoked just after building shard manager.void
preBuild
(net.dv8tion.jda.api.sharding.DefaultShardManagerBuilder builder) Method invoked just before building shard manager.protected static void
runBot
(Class<? extends EnhancedBot> botClass) Method used to run the bot
-
Constructor Details
-
EnhancedBot
protected EnhancedBot()
-
-
Method Details
-
runBot
protected static void runBot(Class<? extends EnhancedBot> botClass) throws ReflectiveOperationException Method used to run the bot- Parameters:
botClass
- Main class of bot. It needs to extend EnhancedBot class- Throws:
ReflectiveOperationException
-
getPackageClass
Get main class from package name- Parameters:
packageName
- Name of package
-
preBuild
public void preBuild(net.dv8tion.jda.api.sharding.DefaultShardManagerBuilder builder) Method invoked just before building shard manager. You can modify builder- Parameters:
builder
-
-
postBuild
public void postBuild(net.dv8tion.jda.api.sharding.ShardManager shardManager) Method invoked just after building shard manager. You can modify it- Parameters:
shardManager
-
-
onReady
public void onReady(net.dv8tion.jda.api.events.session.ReadyEvent event) Method invoked when bot is ready- Parameters:
event
- ReadyEvent
-
onShutdown
public void onShutdown()Method invoked just before shutdown -
getEnhancedPackage
-
getBotPackage
-
getComponentController
-
getListenerController
-
getCommandController
-
getDataController
-
getDotenv
public io.github.cdimascio.dotenv.Dotenv getDotenv() -
getShardManager
public net.dv8tion.jda.api.sharding.ShardManager getShardManager() -
getPackageMapping
-