#include "connectors/BotToken.h" #include #define TG_BOT_TOKEN_LENGTH 46 namespace MBFT { namespace BotToken { int get_token_length(void) { return TG_BOT_TOKEN_LENGTH; } bool load_token(char *buf) { buf[TG_BOT_TOKEN_LENGTH] = '\0'; std::ifstream f(".token"); if (f.is_open()) { f.read(buf, TG_BOT_TOKEN_LENGTH); f.close(); return true; } else { return false; } } } }