Created the config.h
This commit is contained in:
parent
a87d5ecdbf
commit
1c07fcd81b
25
src/api/config.h
Normal file
25
src/api/config.h
Normal 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
|
Loading…
x
Reference in New Issue
Block a user