122 {
124 {
125 using Tuple = TupleType<TypedHandler>;
126
127 Tuple arguments;
128 std::get<0>(arguments) = chatHandler;
129 ChatCommandResult result = ConsumeFromOffset<Tuple, 1>(arguments, chatHandler, argsStr);
130 if (result)
131 return std::apply(reinterpret_cast<TypedHandler*>(handler), std::move(arguments));
132 else
133 {
136 return false;
137 }
138 };
139 _handler =
reinterpret_cast<void*
>(handler);
140 }
AC_GAME_API void SendErrorMessageToHandler(ChatHandler *handler, std::string_view str)
Definition: ChatCommandHelpers.cpp:21
Definition: ChatCommandHelpers.h:100
bool HasErrorMessage() const
Definition: ChatCommandHelpers.h:115
std::string const & GetErrorMessage() const
Definition: ChatCommandHelpers.h:116