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 void
addEvent
(net.dv8tion.jda.api.hooks.ListenerAdapter... listenerAdapters) Called to add a ListenerAdapter to the EventListener.static void
createBot
(BotVersion version1, int shardAmount) Create a newShardManager
instance and set the rest information for later use.static String
getBuild()
Get the build / the actual version in the x.y.z format.static BotVersion
Get the current Bot Version.static Color
Called to get a random Embed supported Color.static void
setActivity
(String message, net.dv8tion.jda.api.entities.Activity.ActivityType activityType) Change the current Activity of the Bot.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.static void
shutdown()
Called when the Bot should Shut down.
-
Method Details
-
createBot
Create a newShardManager
instance 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.
-