{"id":13951064,"url":"https://github.com/FabrizioBrancati/SwiftyBot","last_synced_at":"2025-07-20T13:32:16.852Z","repository":{"id":87348883,"uuid":"63642690","full_name":"FabrizioBrancati/SwiftyBot","owner":"FabrizioBrancati","description":"How to create a Telegram, Facebook Messenger, and Google Assistant bot with Swift using Vapor on Linux and macOS.","archived":false,"fork":false,"pushed_at":"2022-05-18T16:39:31.000Z","size":993,"stargazers_count":270,"open_issues_count":0,"forks_count":38,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-20T10:02:59.864Z","etag":null,"topics":["bot","bot-platform","facebook","facebook-messenger-bot","google","google-assistant-bot","linux","macos","messenger","messenger-bot","swift","swiftybot","telegram","telegram-bot","ubuntu","vapor","vapor-toolbox","xcode"],"latest_commit_sha":null,"homepage":"https://www.fabriziobrancati.com/SwiftyBot-2","language":"Swift","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/FabrizioBrancati.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","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}},"created_at":"2016-07-18T22:56:26.000Z","updated_at":"2025-05-19T14:49:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"62a4ec91-d471-41f9-926f-3efd4a5156e5","html_url":"https://github.com/FabrizioBrancati/SwiftyBot","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/FabrizioBrancati/SwiftyBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabrizioBrancati%2FSwiftyBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabrizioBrancati%2FSwiftyBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabrizioBrancati%2FSwiftyBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabrizioBrancati%2FSwiftyBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FabrizioBrancati","download_url":"https://codeload.github.com/FabrizioBrancati/SwiftyBot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabrizioBrancati%2FSwiftyBot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266135009,"owners_count":23881774,"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","bot-platform","facebook","facebook-messenger-bot","google","google-assistant-bot","linux","macos","messenger","messenger-bot","swift","swiftybot","telegram","telegram-bot","ubuntu","vapor","vapor-toolbox","xcode"],"created_at":"2024-08-08T06:01:12.330Z","updated_at":"2025-07-20T13:32:16.508Z","avatar_url":"https://github.com/FabrizioBrancati.png","language":"Swift","funding_links":[],"categories":["Bot Libraries","Swift"],"sub_categories":["Unofficial"],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"Resources/Banner.png\" alt=\"SwiftyBot Banner\"\u003e\n\u003c/p\u003e\n\n[![Build Status](https://travis-ci.com/FabrizioBrancati/SwiftyBot.svg?branch=master)](https://travis-ci.org/FabrizioBrancati/SwiftyBot)\n[![Coverage Status](https://codecov.io/gh/FabrizioBrancati/SwiftyBot/branch/master/graph/badge.svg)](https://codecov.io/gh/FabrizioBrancati/SwiftyBot)\n[![Maintainability](https://api.codeclimate.com/v1/badges/4e5f16144afda5c8ae36/maintainability)](https://codeclimate.com/github/FabrizioBrancati/SwiftyBot/maintainability)\n[![Codebeat Badge](https://codebeat.co/badges/ff777248-e375-4c6d-8a77-4475c2bc9ae1)](https://codebeat.co/projects/github-com-fabriziobrancati-swiftybot-master)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e71d428e5a9e493d966de02608e6e110)](https://www.codacy.com/manual/FabrizioBrancati/SwiftyBot)\n\u003cbr\u003e\n[![Version](https://img.shields.io/badge/version-3.0.0-blue.svg)](https://developer.apple.com/swift/)\n[![Language](https://img.shields.io/badge/language-Swift%205.1-orange.svg)](https://developer.apple.com/swift/)\n[![Platforms](https://img.shields.io/badge/platform-Linux%20/%20macOS-cc9c00.svg)](https://developer.apple.com/swift/)\n[![License](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/FabrizioBrancati/SwiftyBot/blob/master/LICENSE)\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"#features\"\u003eFeatures\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#platforms-and-tutorials\"\u003ePlatforms and Tutorials\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#language-support\"\u003eLanguage Support\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#requirements\"\u003eRequirements\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#communication\"\u003eCommunication\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#deploying\"\u003eDeploying\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#platforms-usage\"\u003ePlatforms Usage\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#documentation\"\u003eDocumentation\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#changelog\"\u003eChangelog\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#demos\"\u003eDemos\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#authors\"\u003eAuthors\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nFeatures\n========\n\nSwiftyBot is an example of how to create a bot with [Swift](https://swift.org/) on top of [Vapor](https://github.com/vapor/vapor).\n\nHere is the list of all the features:\n- [x] Telegram bot integration\n- [x] Facebook Messenger bot integration\n- [x] Google Assistant bot integration\n- [x] Well documented (you can find more in [Documentation](https://github.com/FabrizioBrancati/SwiftyBot#documentation) section)\n- [x] Well tested (currently 99% of code coverage)\n- [x] Clean (every bot platform has its folder with its files and tests)\n- [x] Easy to follow (every bot platform comes with a tutorial, more in [Platforms and Tutorials](https://github.com/FabrizioBrancati/SwiftyBot#platforms-and-tutorials) section)\n- [x] Multi language support\n\n\u003e There are a lot of bot platforms out there that can be added...\n\nPlatforms and Tutorials\n=======================\n\n| **Bot Platform**   | **Blog Post Link** |\n|--------------------|--------------------|\n| Telegram           | _[How to create a Telegram bot with Swift using Vapor on Ubuntu / macOS](https://www.fabriziobrancati.com/SwiftyBot)_ |\n| Facebook Messenger | _[How to create a Facebook Messenger bot with Swift](https://www.fabriziobrancati.com/SwiftyBot-2)_ |\n| Google Assistant   | _[Not Available Yet](#)_ |\n\nLanguage Support\n================\n\n- English (en)\n\nRequirements\n============\n\n- Ubuntu 14.04 or later with Swift 5.1 or later / macOS with Xcode 11.2 or later\n- Telegram account and a Telegram app for any platform (Telegram bot only)\n- Facebook account and a Facebook Messenger app for any platform (Facebook Messenger bot only)\n- Google account and a Google Assistant app for any platform (Google Assistant bot only)\n\nCommunication\n=============\n\n- If you need help, open an issue.\n- If you found a bug, open an issue.\n- If you have a feature request, open an issue.\n- If you want to contribute, see [Contributing](https://github.com/FabrizioBrancati/SwiftyBot#contributing) section.\n\nContributing\n============\n\nSee [CONTRIBUTING.md](https://github.com/FabrizioBrancati/SwiftyBot/blob/master/.github/CONTRIBUTING.md) file.\n\nDeploying\n=========\n\n## Private Server\n1. Install Swift on your computer / server\n2. Install [Vapor Toolbox](https://github.com/vapor/toolbox) (Optional)\n3. Enable TLS (You can use [Let's Encrypt](https://letsencrypt.org))\n4. Use Apache or nginx as reverse proxy\n5. Use Supervisor to ensure your bot is always up and running\n\nIf you need more help through this steps, you can read [How to create a Facebook Messenger bot with Swift](https://www.fabriziobrancati.com/SwiftyBot-2) blog post, from [Step 1](https://www.fabriziobrancati.com/SwiftyBot-2#step-1) to [Step 4](https://www.fabriziobrancati.com/SwiftyBot-2#step-4).\n\n## Heroku\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n1. Click the button above\n2. Go to the _Settings_ section of your application\n3. Click on the _Reveal Config Vars_ button in _Config Vars_ section\n4. Copy all the created secret key set to up the bots, read the next sections for more info\n\n## Vapor Cloud\n1. Create an account on [Vapor Cloud](https://dashboard.vapor.cloud)\n2. Create an organization\n3. Create a project\n4. Create an application\n5. Add an hosting service and connect it to your GitHub repository\n6. Add at least 1 environment, 2 is better\n7. Use the [Vapor Toolbox](https://github.com/vapor/toolbox) to deploy your bot\n\nPlatforms Usage\n===============\n\n## Telegram\n1. Set a secret key in `TELEGRAM_SECRET` environment variable\n2. Create a Telegram bot with [BotFather](https://telegram.me/botfather)\n\nIf you need more help through this steps, you can read [How to create a Telegram bot with Swift using Vapor on Ubuntu / macOS](https://www.fabriziobrancati.com/SwiftyBot) blog post.\n\n## Facebook Messenger\n1. Set a secret key in `MESSENGER_SECRET` environment variable\n2. Create a Facebook app and Page\n3. Get a Page access token and set it in `MESSENGER_TOKEN` environment variable\n\nIf you need more help through this steps, you can read [How to create a Facebook Messenger bot with Swift](https://www.fabriziobrancati.com/SwiftyBot-2) blog post.\n\n## Google Assistant\n1. Set a secret key in `ASSISTANT_SECRET` environment variable\n2. Create an Actions on Google project\n3. Setup Actions on Google project on Dialogflow\n\nDocumentation\n=============\n\n## Bot\n- Every line of every project file is commented.\n- If you need Vapor documentation you can find it [here](https://docs.vapor.codes/).\n\n## Platforms\n- If you need Telegram bot documentation you can find it [here](https://core.telegram.org/bots/api).\n- If you need Facebook Messenger bot documentation you can find it [here](https://developers.facebook.com/docs/messenger-platform).\n- If you need Google Assistant bot documentation you can find it [here](https://developers.google.com/assistant) and [here](https://dialogflow.com/docs). You can also find some JSON examples [here](https://developers.google.com/actions/conversation-api-playground) and [here](https://github.com/dialogflow/fulfillment-webhook-json).\n\nChangelog\n=========\n\nTo see what has changed in recent version of SwiftyBot, see the **[CHANGELOG.md](https://github.com/FabrizioBrancati/SwiftyBot/blob/master/CHANGELOG.md)** file.\n\nDemos\n=====\n\n### Telegram\nYou can open Telegram and search for **[SwiftyBot](https://telegram.me/SwiftyBot)** to start talking with him!\n\n### Facebook Messenger\nYou can open Facebook Messenger and search for **[SwiftyBotMessenger](http://m.me/SwiftyBotMessenger)** to start talking with him!\n\n### Google Assistant\nYou can open Google Assistant and write **[Talk to SwiftyBot](https://assistant.google.com/services/invoke/uid/000000d447b4593f)** to start talking with him!\n\nAuthors\n=======\n\n### Bot\n**Fabrizio Brancati**\n\n[https://www.fabriziobrancati.com](https://www.fabriziobrancati.com) - [fabrizio.brancati@gmail.com](mailto:fabrizio.brancati@gmail.com)\n\n### Icon\n**Roberto Chiaveri**\n\n[http://robertochiaveri.it](http://robertochiaveri.it)\n\nLicense\n=======\n\nSwiftyBot is available under the MIT license. See the **[LICENSE](https://github.com/FabrizioBrancati/SwiftyBot/blob/master/LICENSE)** file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFabrizioBrancati%2FSwiftyBot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFabrizioBrancati%2FSwiftyBot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFabrizioBrancati%2FSwiftyBot/lists"}