diff --git a/src/dpp/slashcommand.cpp b/src/dpp/slashcommand.cpp index 336e43e831..9832eb28f4 100644 --- a/src/dpp/slashcommand.cpp +++ b/src/dpp/slashcommand.cpp @@ -333,6 +333,9 @@ command_option_choice &command_option_choice::fill_from_json(nlohmann::json *j) command_option::command_option(command_option_type t, const std::string &n, const std::string &d, bool r) : type(t), name(n), description(d), required(r), autocomplete(false) { + if (std::any_of(n.begin(), n.end(), [](unsigned char c){ return std::isupper(c); })) { + throw dpp::logic_exception("Command options can not contain capital letters in the name of the option."); + } } command_option& command_option::add_choice(const command_option_choice &o)