Class BotConfig


  • public final class BotConfig
    extends Object
    Contains configuration resources for the bot. A resource is a set of properties that can be read via the PropertyReader interface.
    • Method Detail

      • fromResourceMap

        public static BotConfig fromResourceMap​(Map<String,​PropertyReader> resources)
        Creates a new BotConfig initialized with resources defined in the given map.
        Parameters:
        resources - the map containing the configuration resources. The key is the name of the resource, the value is the resource itself
        Returns:
        a new BotConfig instance
      • resource

        public PropertyReader resource​(String name)
        Gets a configuration resource by the given name.
        Parameters:
        name - the name of the resource
        Returns:
        the configuration resource associated with the name
        Throws:
        IllegalArgumentException - if the resource is not found