Class BotWorker

java.lang.Object
de.presti.ree6.bot.BotWorker

public class BotWorker extends Object
Class to store information about the bot.
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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 new ShardManager instance and set the rest information for later use.
    static String
    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
    Called when the Bot should Shut down.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • createBot

      public static void createBot(BotVersion version1, int shardAmount)
      Create a new ShardManager 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

      public static Color randomEmbedColor()
      Called to get a random Embed supported Color.
      Returns:
      a Color.
    • getVersion

      public static BotVersion getVersion()
      Get the current Bot Version.
      Returns:
      the BotVersion
    • getBuild

      public static String getBuild()
      Get the build / the actual version in the x.y.z format.
      Returns:
      the Build.