{"id":18869929,"url":"https://github.com/kaikyulotus/icy-bot","last_synced_at":"2026-03-11T04:01:48.263Z","repository":{"id":119494651,"uuid":"118951101","full_name":"KaikyuLotus/icy-bot","owner":"KaikyuLotus","description":"C++ Telegram Bot with personal Telegram-bot-api wrapper.","archived":false,"fork":false,"pushed_at":"2020-02-16T22:14:33.000Z","size":3607,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-06T08:35:34.103Z","etag":null,"topics":["callbacks","cpp","curl","json","telegram","telegram-bot","telegram-bot-api"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KaikyuLotus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-25T18:26:37.000Z","updated_at":"2023-11-02T19:40:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"692a406a-628a-4581-b551-ba0a371ca952","html_url":"https://github.com/KaikyuLotus/icy-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KaikyuLotus/icy-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaikyuLotus%2Ficy-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaikyuLotus%2Ficy-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaikyuLotus%2Ficy-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaikyuLotus%2Ficy-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KaikyuLotus","download_url":"https://codeload.github.com/KaikyuLotus/icy-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaikyuLotus%2Ficy-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30370266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["callbacks","cpp","curl","json","telegram","telegram-bot","telegram-bot-api"],"created_at":"2024-11-08T05:18:10.758Z","updated_at":"2026-03-11T04:01:48.231Z","avatar_url":"https://github.com/KaikyuLotus.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IcyBot\n\n**This is just a small training project and it's not intended for everyday use.**\nPlease feel free to give me some tips.\nThis is my first \"big\" C++ project.\n\n## Examples\n# EXAMPLES ARE NOT UP TO DATE!\n### Hello World Command\n```c++\nvoid helloWorld(Bot* bot, Update update) {\n\tint messageID = update.message.messageID;\n\tint chatID = update.message.chat.chatID;\n\n\tbot-\u003esendChatAction(chatID, TYPING).fire();\n\n\tbot-\u003esendMessage(chatID, \"*Hello World*\")\n\t\t.add(Arguments::parseMode, Arguments::markdown)\n\t\t.add(Arguments::replyToMessage, messageID)\n\t\t.fire();\n}\n\nint main() {\n\t// Initialize your bot\n\tBot bot = Bot(\"TOKEN\");\n\t\n\t// Add a function in response to /helloWorld\n\tbot.addCommandHandler(\"helloWorld\", \u0026helloWorld);\n\t\n\t// Start getting updates!\n\tbot.startPolling();\n\t\n\tbot.idle();\n}\n```\n\n### Echo Bot\n```c++\nvoid updateHandler(Bot* bot, Update update) {\n\tbot-\u003esendChatAction(update.message.chat.chatID, TYPING).fire();\n\tbot-\u003esendMessage(update.message.chat.chatID, update.message.text).fire();\n}\n\nint main() {\n\tBot bot = Bot(\"TOKEN\");\n\t\n\t// Add the updates handler, this handler will receive every update\n\tbot-\u003esetUpdateHandler(\u0026updateHandler);\n\t\n\tbot.startPolling();\n\tbot.idle();\n\t\n\treturn 0;\n}\n```\n\n### Multiple Bots\n```c++\n// Sample function\nvoid start(Bot* bot, Update update) {\n\tbot-\u003esendChatAction(update.message.chat.chatID, TYPING).fire();\n\tbot-\u003esendMessage(update.message.chat.chatID, \"Start!\").fire();\n}\n\nint main() {\n\t// Initialize your bots\n\tBot bot1 = Bot(\"TOKEN1\");\n\tBot bot2 = Bot(\"TOKEN2\");\n\t\n\t// Add your commands-functions\n\tbot1.addCommandHandler(\"start\", \u0026start);\n\tbot2.addCommandHandler(\"start\", \u0026start);\n\t\n\t// Start getting updates with both bots!\n\tbot1.startPolling();\n\tbot2.startPolling();\n\n\tbot1.idle();\n\t\n\treturn 0;\n}\n```\n\n### Handle CppTelegramBots\n```c++\nvoid errorHandler(Bot* bot, Update update, std::string func, std::string error) {\n\tLog::Error(\"Handled error: '\" + error + \"' in command '\" + func + \"'\");\n\tLog::Debug(\"Last error has been caused by:\\n'\" + update.update_json.dump(2) + \"'\");\n}\n\n// Sample function\nvoid generateError(Bot* bot, Update update) {\n\tbot-\u003esendChatAction(update.message.chat.chatID, TYPING).fire();\n\tbot-\u003esendMessage(update.message.chat.chatID, \"Generating error...\").fire();\n\t\n\t// throw a test error\n\tthrow std::overflow_error(\"Divide by zero exception\");\n}\n\nint main() {\n\tBot bot = Bot(\"TOKEN\");\n\tbot.addCommandHandler(\"generateError\", \u0026generateError);\n\t\n\t// Add our error handler\n\tbot.addErrorHandler(\u0026errorHandler);\n\t\n\tbot.startPolling();\n\tbot.idle();\n\t\n\treturn 0;\n}\n```\n\n## Dependencies\n[cpprestsdk](https://github.com/microsoft/cpprestsdk)\n\n[JSON for Modern C++](https://github.com/nlohmann/json)\n\n\n\n**Notice**:\n\nI'm **new** to C++ \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaikyulotus%2Ficy-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaikyulotus%2Ficy-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaikyulotus%2Ficy-bot/lists"}