BotMine›Developer Docs›Config
Lua Addon SDK
Config
Read addon configuration and schema information.
Overview
Configuration is available through config and discord.config. It contains values set for a bot installation.
lualocal logChannelId = config:get("log_channel") local requiredValue = config:require("api_key") if config:has("enabled") then logger.info("Addon is configured.") end
Methods
get(key, fallback?)require(key)has(key)all()schema()
Fallbacks
lualocal prefix = config:get("prefix", "!")
Read schema
lualocal schema = config:schema() for index = 1, #schema do logger.debug(schema[index].key) end