diff --git a/src/userapptest/userapp.cpp b/src/userapptest/userapp.cpp index 1efcbb5656..99f75e68fd 100644 --- a/src/userapptest/userapp.cpp +++ b/src/userapptest/userapp.cpp @@ -47,13 +47,10 @@ int main() { } }); - bot.on_slashcommand([](const auto& e) { + bot.register_command("userapp", [](const dpp::slashcommand_t& e) { /** * Simple test output that shows the context of the command */ - if (e.command.get_command_name() != "userapp") { - return; - } e.reply("This is the `/userapp` command." + std::string( e.command.is_user_app_interaction() ? " Executing as a user interaction owned by user: <@" + e.command.get_authorizing_integration_owner(dpp::ait_user_install).str() + ">" :