diff --git a/src/controllers/commands/CommandController.cpp b/src/controllers/commands/CommandController.cpp index caa3c89f3..293277de2 100644 --- a/src/controllers/commands/CommandController.cpp +++ b/src/controllers/commands/CommandController.cpp @@ -1,6 +1,7 @@ #include "CommandController.hpp" #include "Application.hpp" +#include "common/Env.hpp" #include "common/SignalVector.hpp" #include "controllers/accounts/AccountController.hpp" #include "controllers/commands/Command.hpp" @@ -439,6 +440,30 @@ void CommandController::initialize(Settings &, Paths &paths) return ""; }); + this->registerCommand("/debug-env", [](const auto & /*words*/, + ChannelPtr channel) { + auto env = Env::get(); + + QStringList debugMessages{ + "recentMessagesApiUrl: " + env.recentMessagesApiUrl, + "linkResolverUrl: " + env.linkResolverUrl, + "twitchEmoteSetResolverUrl: " + env.twitchEmoteSetResolverUrl, + "twitchServerHost: " + env.twitchServerHost, + "twitchServerPort: " + QString::number(env.twitchServerPort), + "twitchServerSecure: " + QString::number(env.twitchServerSecure), + }; + + for (QString &str : debugMessages) + { + MessageBuilder builder; + builder.emplace(QTime::currentTime()); + builder.emplace(str, MessageElementFlag::Text, + MessageColor::System); + channel->addMessage(builder.release()); + } + return ""; + }); + this->registerCommand("/uptime", [](const auto & /*words*/, auto channel) { auto *twitchChannel = dynamic_cast(channel.get()); if (twitchChannel == nullptr)