{"id":15375194,"url":"https://github.com/arashabedii/telebot","last_synced_at":"2025-04-15T12:32:15.517Z","repository":{"id":40577280,"uuid":"354619124","full_name":"ArashAbedii/TeleBot","owner":"ArashAbedii","description":"a PHP framework for creating telegram bots","archived":false,"fork":false,"pushed_at":"2023-11-26T10:41:30.000Z","size":152,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T03:05:22.182Z","etag":null,"topics":["bot","framework","php","telebot","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArashAbedii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-04-04T18:35:14.000Z","updated_at":"2025-01-07T12:35:02.000Z","dependencies_parsed_at":"2024-10-01T14:01:57.458Z","dependency_job_id":"1762e590-adc8-4969-875d-3be5a9b7f15a","html_url":"https://github.com/ArashAbedii/TeleBot","commit_stats":{"total_commits":113,"total_committers":1,"mean_commits":113.0,"dds":0.0,"last_synced_commit":"efcb9733dae2d2d5c7345298f7f5598b9e7e9344"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArashAbedii%2FTeleBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArashAbedii%2FTeleBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArashAbedii%2FTeleBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArashAbedii%2FTeleBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArashAbedii","download_url":"https://codeload.github.com/ArashAbedii/TeleBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072400,"owners_count":21208181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bot","framework","php","telebot","telegram","telegram-api","telegram-bot","telegram-bot-api","telegram-bots"],"created_at":"2024-10-01T14:01:50.937Z","updated_at":"2025-04-15T12:32:15.199Z","avatar_url":"https://github.com/ArashAbedii.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  TELEGRAM BOT FRAMEWORK\n### Create Everything \u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n\n\n## Installition \u0026 Configration\n\u003cbr\u003e\n\n#### composer\n```\ncomposer create-project arashabedii/telebot\n```\n\u003cbr/\u003e\n\ngo to the [@botfather](https://t.me/botfather) in telegram and create a new bot\nthen copy your api token.\n\n\u003cbr/\u003e\n\nat first you need to configure your bot settings. so go to the config/env.php file.\u003c/br\u003e\nIn the env.php you can define and setup every options on your bot that you want.\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n## necessary config fields\n#### You should fill these settings\n```PHP\n\u003c?php\n\u003c?php\n\n$host='http://localhost:8005'; //PUT YOUR IP OR DOMAIN ADDRESS HERE. EXAMPLE: http://192.168.1.15\n$botUrl=$host.''; //PUT BOT ROOT PATH HERE. EXAMPLE: $botUrl=$host.'/TeleBotDir';\n\n\nreturn [\n    'token'=\u003e'BOT_TOKEN', //PUT YOUR BOT TOKEN HERE\n    'ADMIN_CHAT_ID'=\u003e'CHAT_ID', //PUT YOUR CHAT_ID HERE\n    'host'=\u003e$host,\n    'bot_url'=\u003e$botUrl,\n    'request_handler_path'=\u003e$botUrl.'/requestsHandler.php',\n    'bot_main_path'=\u003e$botUrl.'/bootstrap/bot.php',\n    'DB_CONNECTION'=\u003e'mysql', //or sqlite\n    'DB_HOST'=\u003e'localhost',\n    'DB_NAME'=\u003e'telebot', //database name\n    'DB_USERNAME'=\u003e'root', //database username\n    'DB_PASSWORD'=\u003e'', //database password\n    'DB_CHARSET'=\u003e'utf8',\n    'DB_COLLATION'=\u003e'utf8_unicode_ci',\n    'APP_BASE_PATH'=\u003edirname(__DIR__),\n];\n\n\n```\n\u003cbr/\u003e\n\n## Run bots\n\n\u003cbr\u003e\n\n### Long Polling\nwith long polling way you can run bots without any domain and ssl and so on \u003cbr\u003e\nyou can run the bot everywhere like: on your server or local machine\n\u003cbr\u003e\nopen terminal in your bot directory and run this command:\n```\nphp artisan run:bot --long-polling\n\n```\n\n### webhook\nyou can use webhook too for running your bots\n\n#### You can set webhook simply by running this command: \u003cbr/\u003e\n```\nphp artisan set:webhook\n\n```\n\u003cbr\u003e\n\nor run\n\n``` \nYOUR_DOMAIN/webhookHandler.php?set=1\n\n```\n\nin your browser\n\n\u003cbr/\u003e\n\n\n### Create a simple bot\n\ngo to the app/Controllers/MessageHandler.php file :\n\n```php\n\u003c?php\n\nnamespace App\\Controllers;\n\nuse Src\\Message;\n\nclass MessageHandler {\n   public function run(){\n       bot()-\u003esendMessage(['text'=\u003e$this-\u003egetText()]); //insert this code\n   }\n }\n\n```\n\nNow start your bot in telegram, then this bot send you every text message that you send to bot. Yes you did it. good job :)\n\n### Now you can read [Documentions](https://arashabedii.github.io/TeleBot) for creating every type of telegram bot.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farashabedii%2Ftelebot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farashabedii%2Ftelebot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farashabedii%2Ftelebot/lists"}