diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -19,6 +19,8 @@ int main() { std::istringstream msg(message->text); std::string command, commandtmp, arguments; + std::cout << "incomming Message: " << message->text << " from " << message->chat->username << "\n"; + std::getline(msg, commandtmp, ' '); std::getline(msg, arguments); //std::cout << "command: " << commandtmp << "\n"; @@ -33,7 +35,6 @@ int main() { request["arguments"] = arguments; request["session"] = std::to_string(message->from->id); - //std::cout << request.dump() << "\n"; cpr::Response r = cpr::Post(cpr::Url{config["n_core"]["adress"].value_or("localhost:18080")}, cpr::Body{request.dump()}); @@ -42,7 +43,6 @@ int main() { return 1; } - //std::cout << r.text << "\n"; auto jreply = json::parse(r.text); @@ -75,7 +75,7 @@ int main() { } else { bot.getApi().sendMessage(message->chat->id, "Command was not successfully executed."); } - + return 0; }); try { |