-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
73 lines (60 loc) · 3.47 KB
/
Copy pathmain.cpp
File metadata and controls
73 lines (60 loc) · 3.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include <filesystem>
#include <fstream>
#include <iostream>
#include "Config.h"
#include "SystemUtils.h"
#include "FunPayAPI/FunPayRequest.h"
#include "FunPayAPI/FunPayAccount.h"
#include "TelegramBot/Telegram.h"
void printLogo()
{
std::cout << "\033[1;36m";
std::cout << R"(
███████╗██╗ ██╗███╗ ██╗██████╗ █████╗ ██╗ ██╗
██╔════╝██║ ██║████╗ ██║██╔══██╗██╔══██╗╚██╗ ██╔╝
█████╗ ██║ ██║██╔██╗ ██║██████╔╝███████║ ╚████╔╝
██╔══╝ ██║ ██║██║╚██╗██║██╔═══╝ ██╔══██║ ╚██╔╝
██║ ╚██████╔╝██║ ╚████║██║ ██║ ██║ ██║
╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═╝
███████╗███████╗███╗ ███╗██╗ ███████╗██╗ ██╗
██╔════╝██╔════╝████╗ ████║██║ ██╔════╝╚██╗██╔╝
███████╗█████╗ ██╔████╔██║██║ █████╗ ╚███╔╝
╚════██║██╔══╝ ██║╚██╔╝██║██║ ██╔══╝ ██╔██╗
███████║███████╗██║ ╚═╝ ██║███████╗███████╗██╔╝ ██╗
╚══════╝╚══════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝
)";
std::cout << "\033[0m" << std::endl;
}
int main()
{
std::cout << "FunPayCardinal медленный из-за Python. Поэтому я создал этот движок, чтобы вы могли запускать СОТНИ акков на FunPay, а также писать плагины как на Python, так и на C++." << std::endl;
std::cout << std::endl;
printLogo();
// Проверка конфигов.
const std::filesystem::path path = SystemUtils::getExecutableDirectory();
ConfigManager configManager{path / "configs" / "config.json"};
if (!configManager.exists())
{
const Config cfg = configManager.setupInteractive();
configManager.save(cfg);
std::cout << "Перезапусти приложение. Я всё сохранил!";
return 0;
}
Config config;
if (!configManager.load(config))
{
std::cerr << "Не удалось загрузить конфиг. Попробуй удалить его и перезапуститься с нуля.";
return 0;
}
Telegram::Start(
config.token,
config.password,
config.telegramProxy,
path / "configs" / "telegram.json");
FunPayAccount funpayAccount{config.userAgent, config.goldenKey};
std::cout << "Привет, " << funpayAccount.getName() << "!" << std::endl;
std::cout << "Твой баланс на данный момент: " << funpayAccount.getBalance() << " рублей. Хороших продаж!" << std::endl;
funpayAccount.startAutoRaise();
funpayAccount.runMessagePolling();
return 0;
}