Add various testing and building code
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include "connectors/tgbot-cpp/TgbotCppConnector.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
MBFT::IConnector *c = new MBFT::TgbotCppConnector();
|
||||
|
||||
for ( ; ; )
|
||||
{
|
||||
std::shared_ptr<MBFT::InboundMessage> msg = c->receive();
|
||||
std::shared_ptr<MBFT::OutboundMessage> reply = std::make_shared<MBFT::OutboundMessage>();
|
||||
|
||||
reply->target_chat_id = msg->chat->id;
|
||||
reply->text = std::string("Hello! The message was:\n") + msg->text;
|
||||
|
||||
c->send(reply);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user