Package de.presti.ree6.bot
Class BotWorker
java.lang.Object
de.presti.ree6.bot.BotWorker
Class to store information about the bot.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddEvent(net.dv8tion.jda.api.hooks.ListenerAdapter... listenerAdapters) Called to add a ListenerAdapter to the EventListener.static voidcreateBot(BotVersion version1, int shardAmount) Create a newShardManagerinstance and set the rest information for later use.static StringgetBuild()Get the build / the actual version in the x.y.z format.static BotVersionGet the current Bot Version.static ColorCalled to get a random Embed supported Color.static voidsetActivity(String message, net.dv8tion.jda.api.entities.Activity.ActivityType activityType) Change the current Activity of the Bot.static voidsetActivity(net.dv8tion.jda.api.JDA jda, String message, net.dv8tion.jda.api.entities.Activity.ActivityType activityType) Change the current Activity of the Bot.static voidshutdown()Called when the Bot should Shut down.
-
Method Details
-
createBot
Create a newShardManagerinstance and set the rest information for later use.- Parameters:
version1- the current Bot Version "typ".shardAmount- the amount of shards to use.
-
setActivity
public static void setActivity(String message, net.dv8tion.jda.api.entities.Activity.ActivityType activityType) Change the current Activity of the Bot.- Parameters:
message- the Message of the Activity.activityType- the Activity type.
-
setActivity
public static void setActivity(net.dv8tion.jda.api.JDA jda, String message, net.dv8tion.jda.api.entities.Activity.ActivityType activityType) Change the current Activity of the Bot.- Parameters:
jda- the JDA instance.message- the Message of the Activity.activityType- the Activity type.
-
shutdown
public static void shutdown()Called when the Bot should Shut down. -
addEvent
public static void addEvent(net.dv8tion.jda.api.hooks.ListenerAdapter... listenerAdapters) Called to add a ListenerAdapter to the EventListener.- Parameters:
listenerAdapters- the Listener Adapter(s) that should be added.
-
randomEmbedColor
Called to get a random Embed supported Color.- Returns:
- a
Color.
-
getVersion
Get the current Bot Version.- Returns:
- the
BotVersion
-
getBuild
Get the build / the actual version in the x.y.z format.- Returns:
- the Build.
-