diff --git a/source/view/handlers/message_handler/message_handler.cpp b/source/view/handlers/message_handler/message_handler.cpp index 2e2bfdf..01c4466 100644 --- a/source/view/handlers/message_handler/message_handler.cpp +++ b/source/view/handlers/message_handler/message_handler.cpp @@ -79,6 +79,10 @@ void AMessage_Handler::Bind_Commands() { TG_Bot.getApi().sendMessage(message->chat->id, AMessage_Reply::Get_Help_Msg()); }); + TG_Bot.getEvents().onCommand(SMessage_Commands::About_Project.data(), [this](TgBot::Message::Ptr message) -> void + { + TG_Bot.getApi().sendMessage(message->chat->id, AMessage_Reply::Get_Info_About_Project()); + }); } // --------------------------------------------------------------------------------------------------------------------- diff --git a/source/view/texts/emoji/emoji.hpp b/source/view/texts/emoji/emoji.hpp index b8434fe..814d375 100644 --- a/source/view/texts/emoji/emoji.hpp +++ b/source/view/texts/emoji/emoji.hpp @@ -31,4 +31,5 @@ #define DETAIL "⚙️" #define STOP_SIGN "🛑" #define CHECK_MARK_GREEN "✅" -#define FLY_MONEY "💸" \ No newline at end of file +#define FLY_MONEY "💸" +#define BOOKS "📚" \ No newline at end of file diff --git a/source/view/texts/message_commands/message_commands.cpp b/source/view/texts/message_commands/message_commands.cpp index 01a205b..0fc08e5 100644 --- a/source/view/texts/message_commands/message_commands.cpp +++ b/source/view/texts/message_commands/message_commands.cpp @@ -28,4 +28,5 @@ constinit std::string_view SMessage_Commands::Profile{ "profile" }; constinit std::string_view SMessage_Commands::Programmer_Game{ "pr_game" }; constinit std::string_view SMessage_Commands::Math_Game{ "math_game" }; constinit std::string_view SMessage_Commands::Answer{ "answer" }; -constinit std::string_view SMessage_Commands::Help{ "help" }; \ No newline at end of file +constinit std::string_view SMessage_Commands::Help{ "help" }; +constinit std::string_view SMessage_Commands::About_Project{ "about_project" }; \ No newline at end of file diff --git a/source/view/texts/message_commands/message_commands.hpp b/source/view/texts/message_commands/message_commands.hpp index 6cb1eaf..06a094e 100644 --- a/source/view/texts/message_commands/message_commands.hpp +++ b/source/view/texts/message_commands/message_commands.hpp @@ -33,4 +33,5 @@ struct SMessage_Commands constinit static std::string_view Math_Game; constinit static std::string_view Answer; constinit static std::string_view Help; + constinit static std::string_view About_Project; }; \ No newline at end of file diff --git a/source/view/texts/message_reply/message_reply.cpp b/source/view/texts/message_reply/message_reply.cpp index 7be935e..61a8531 100644 --- a/source/view/texts/message_reply/message_reply.cpp +++ b/source/view/texts/message_reply/message_reply.cpp @@ -68,5 +68,11 @@ std::string AMessage_Reply::Get_Incorrect_Answer_Msg(std::int64_t score, std::st // --------------------------------------------------------------------------------------------------------------------- std::string AMessage_Reply::Get_Help_Msg() { - return std::format("Привіт Арбуз, це блок з поясненням деяких ігрових механік {}\n\n1) Як відповідати на задачі ?\nВсе дуже просто пишеш команду /answer і через пробіл відповідь, наприклад: /answer 25\n\n2) Як вирішити гру pr_game, погугли про оператори &(AND) |(OR)\n\nЯкщо в тебе виникли проблеми, пиши власнику бота: https://t.me/hellowolrd36", DETAIL); + return std::format("Привіт Арбуз, це блок з поясненням деяких ігрових механік {}\n\n1) Як відповідати на задачі ?\nВсе дуже просто пишеш команду /answer і через пробіл відповідь, наприклад: /answer 25\n\n2) Як вирішити гру pr_game, погугли про оператори &(AND) |(OR)\n\nЯкщо в тебе виникли проблеми, пиши власнику бота: @hellowolrd36", DETAIL); +} + +// --------------------------------------------------------------------------------------------------------------------- +std::string AMessage_Reply::Get_Info_About_Project() +{ + return std::format("Інформація про цей проект{}\n\nЦе Open-Source проект ліцензований під MIT ліцензією.\nПосилання на код проекту: https://github.com/The-B1T-Foundation/tg_arbuz-bot\nПровідний розробник проекту: https://github.com/b1tflyyyy\n\nСвої побажання щодо функціоналу надсилайте до @hellowolrd36 або на пошту theb1tfoundation.gh@gmail.com", BOOKS); } \ No newline at end of file diff --git a/source/view/texts/message_reply/message_reply.hpp b/source/view/texts/message_reply/message_reply.hpp index fc7fb06..4e4678e 100644 --- a/source/view/texts/message_reply/message_reply.hpp +++ b/source/view/texts/message_reply/message_reply.hpp @@ -47,4 +47,5 @@ class AMessage_Reply static std::string Get_Correct_Answer_Msg(std::int64_t score); static std::string Get_Incorrect_Answer_Msg(std::int64_t score, std::string_view correct_answer); static std::string Get_Help_Msg(); + static std::string Get_Info_About_Project(); }; \ No newline at end of file