Class BLHJDAUpdater

  • All Implemented Interfaces:
    dev.mlnr.blh.core.api.IBLHUpdater

    public class BLHJDAUpdater
    extends java.lang.Object
    implements dev.mlnr.blh.core.api.IBLHUpdater
    An updater class for JDA used for automatic stats posting.
    • Constructor Summary

      Constructors 
      Constructor Description
      BLHJDAUpdater​(net.dv8tion.jda.api.JDA jda)
      Creates a new updater for JDA.
      BLHJDAUpdater​(net.dv8tion.jda.api.sharding.ShardManager shardManager)
      Creates a new updater for JDA.
    • Constructor Detail

      • BLHJDAUpdater

        public BLHJDAUpdater​(@Nonnull
                             net.dv8tion.jda.api.JDA jda)
        Creates a new updater for JDA.
        Parameters:
        jda - The JDA object to get the bot id and the guild amount from
        Throws:
        java.lang.IllegalArgumentException - If the provided JDA object is null
      • BLHJDAUpdater

        public BLHJDAUpdater​(@Nonnull
                             net.dv8tion.jda.api.sharding.ShardManager shardManager)
        Creates a new updater for JDA.
        Parameters:
        shardManager - The ShardManager object to get the bot id and the guild amount from
        Throws:
        java.lang.IllegalArgumentException - If the provided ShardManager object is null
        java.lang.IllegalStateException - If the shard 0 of the ShardManager is null
    • Method Detail

      • getBotId

        public long getBotId()
        Specified by:
        getBotId in interface dev.mlnr.blh.core.api.IBLHUpdater
      • getServerCount

        public long getServerCount()
        Specified by:
        getServerCount in interface dev.mlnr.blh.core.api.IBLHUpdater