aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2023-11-21 16:10:08 -0500
committerCara Salter <cara@devcara.com>2023-11-21 16:10:08 -0500
commitf78c7cf82726324fcee6b738e3d670bee02ad3ff (patch)
treeece037cba4f701f67f22bdbd8f916f66a0e08036 /src/main.cpp
parentbe5e0dd226a29d1d45f94d02bb63c64defbe33fd (diff)
download142bot-f78c7cf82726324fcee6b738e3d670bee02ad3ff.tar.gz
142bot-f78c7cf82726324fcee6b738e3d670bee02ad3ff.zip
autotoolsHEADmaster
no more cmake!
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6ce5858..b22460c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,13 +1,16 @@
+#include <curl/curl.h>
#include <dpp/dpp.h>
#include <dpp/json.h>
#include <142bot/bot.hpp>
#include <142bot/db.hpp>
+#include <fmt/core.h>
#include <spdlog/spdlog.h>
#include <spdlog/async.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <spdlog/sinks/rotating_file_sink.h>
#include <string>
+#include <fmt/format.h>
#include <sentry.h>
@@ -23,15 +26,16 @@ int main(int argc, char const *argv[]) {
std::ifstream f("config.json");
json cfg = json::parse(f);
+ curl_global_init(CURL_GLOBAL_ALL);
string token = cfg.value("token", "bad-token");
sentry_options_t *options = sentry_options_new();
sentry_options_set_dsn(options, cfg.value("sentry_dsn", "").c_str());
// This is also the default-path. For further information and recommendations:
// https://docs.sentry.io/platforms/native/configuration/options/#database-path
sentry_options_set_database_path(options, ".sentry-native");
- sentry_options_set_release(options, "142bot@" + onefortytwobot_VERSION_MAJOR + '.' + onefortytwobot_VERSION_MINOR);
+ sentry_options_set_release(options, fmt::format("142bot@{}", PACKAGE_VERSION).c_str());
sentry_options_set_debug(options, 0);
- sentry_options_set_environment(options, onefortytwobot_env);
+ sentry_options_set_environment(options, "production");
sentry_options_set_symbolize_stacktraces(options, 1);
sentry_init(options);
dpp::cluster bot(token, dpp::intents::i_all_intents);