Created the config.h

This commit is contained in:
Mathias Wagner 2023-10-29 14:22:45 +01:00
parent a87d5ecdbf
commit 1c07fcd81b
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

25
src/api/config.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef BOT_CONFIG_H
#define BOT_CONFIG_H
#include <dpp/json.h>
using json = nlohmann::json;
class config {
public:
/**
* Reads the config file and returns a json object.
* @return json object
*/
static json read_config();
/**
* Checks if the config file is valid.
* @param config json object
* @return true if valid, false if not
*/
static bool is_valid_config(const json& config);
};
#endif //BOT_CONFIG_H