diff --git a/src/util/completionmodel.cpp b/src/util/completionmodel.cpp index cb8fa6370..0d2169c2c 100644 --- a/src/util/completionmodel.cpp +++ b/src/util/completionmodel.cpp @@ -2,6 +2,7 @@ #include "application.hpp" #include "common.hpp" +#include "controllers/commands/commandcontroller.hpp" #include "debug/log.hpp" #include "singletons/emotemanager.hpp" @@ -63,6 +64,11 @@ void CompletionModel::refresh() this->addString(":" + m + ":", TaggedString::Type::Emoji); } + // Commands + for (auto &command : app->commands->items.getVector()) { + this->addString(command.name, TaggedString::Command); + } + // Channel-specific: Usernames // fourtf: only works with twitch chat // auto c = singletons::ChannelManager::getInstance().getTwitchChannel(this->channelName); diff --git a/src/util/completionmodel.hpp b/src/util/completionmodel.hpp index 687cbb2ef..bbcb26a6b 100644 --- a/src/util/completionmodel.hpp +++ b/src/util/completionmodel.hpp @@ -24,6 +24,7 @@ class CompletionModel : public QAbstractListModel TwitchGlobalEmote, TwitchSubscriberEmote, Emoji, + Command, }; TaggedString(const QString &_str, Type _type)