125 {
127 {
128 using Tuple = TupleType<TypedHandler>;
129
130 Tuple arguments;
131 std::get<0>(arguments) = chatHandler;
132 ChatCommandResult result = ConsumeFromOffset<Tuple, 1>(arguments, chatHandler, argsStr);
133 if (result)
134 return std::apply(reinterpret_cast<TypedHandler*>(handler), std::move(arguments));
135 else
136 {
139 return false;
140 }
141 };
142 _handler =
reinterpret_cast<void*
>(handler);
143 }
AC_GAME_API void SendErrorMessageToHandler(ChatHandler *handler, std::string_view str)
Definition: ChatCommandHelpers.cpp:22
Definition: ChatCommandHelpers.h:101
bool HasErrorMessage() const
Definition: ChatCommandHelpers.h:116
std::string const & GetErrorMessage() const
Definition: ChatCommandHelpers.h:117