From 420f536c9b4f73a034ea52751d59b7be3eea513d Mon Sep 17 00:00:00 2001 From: Syping Date: Mon, 25 Mar 2024 11:15:08 +0100 Subject: [PATCH] make configuration more understandable --- rpmsrc/dtranslatebot.json | 9 ++++++++- src/core/settings.cpp | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/rpmsrc/dtranslatebot.json b/rpmsrc/dtranslatebot.json index 29ba5d7..ca2aa94 100644 --- a/rpmsrc/dtranslatebot.json +++ b/rpmsrc/dtranslatebot.json @@ -1,5 +1,12 @@ { - "token": "add bot token from here -> https://discord.com/developers/applications", + /* + A DISCORD BOT TOKEN IS NECESSARY TO USE THIS APPLICATION! + + You can get a Bot Token from the Discord Developer Portal + by creating a New Application: + https://discord.com/developers/applications + */ + "token": "", "translator": { "type": "stub" } diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 37e6f59..8ba95ed 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -507,7 +507,7 @@ bool settings::parse(const std::string &data, bool initialize) try { dpp::json json; try { - json = dpp::json::parse(data); + json = dpp::json::parse(data, nullptr, true, true); } catch (const std::exception &exception) { std::cerr << "[Exception] " << exception.what() << std::endl;