Added the ability to use custom config files in the main.cpp
This commit is contained in:
parent
98a9b068a4
commit
7f0c7828fb
@ -2,12 +2,14 @@
|
||||
#include "listeners/ready.h"
|
||||
#include "api/config.h"
|
||||
|
||||
#define CONFIG_PATH "config.json"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
using namespace dpp;
|
||||
|
||||
int main() {
|
||||
json configuration = config::read_config();
|
||||
int main(int argc, char **argv) {
|
||||
json configuration = config::read_config(argc < 2 ? CONFIG_PATH : argv[1]);
|
||||
|
||||
cluster bot(configuration["token"], dpp::i_default_intents | dpp::i_message_content);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user