What does it do • Compatibility • Language support • Requirements • Communication • Contributing • Installing and Usage • Documentation • Changelog • Demo • Todo • Author • License
SwiftyBot is an example of how to create a Telegram & Facebook Messenger bot with Swift using Vapor.
See Compatibility section to check service and version it supports, you can also see its blog post with the link in that table.
Bot Type | Version | Blog Post Link |
---|---|---|
Telegram | 1.0...1.2 | How to create a Telegram bot with Swift using Vapor on Ubuntu / macOS |
Facebook Messenger | 2.0...2.3 | How to create a Facebook Messenger bot with Swift |
??? | 3.0 | ??? |
- English (en)
- Ubuntu 14.04 or later with Swift 4.1 or later / macOS with Xcode 9.3 or later
- Telegram account and a Telegram App for any platform (Telegram bot only)
- Facebook account and a Facebook Messenger App for any platform (Facebook Messenger bot only)
- If you need help, open an issue.
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, see Contributing section.
See CONTRIBUTING.md file.
- Install Swift on your computer / server
- Install Vapor Toolbox (Optional)
- Set a secret key in
TELEGRAM_SECRET
environment variable - Enable TLS (You can use Let's Encrypt)
- Use Apache or nginx as reverse proxy
- Create a Telegram bot with BotFather
- Use Supervisor to ensure your bot is always up and running
If you need more help through this steps, you can read How to create a Telegram bot with Swift using Vapor on Ubuntu / macOS blog post.
- Install Swift on your computer / server
- Install Vapor Toolbox (Optional)
- Set a secret key in
MESSENGER_SECRET
environment variable - Enable TLS (You can use Let's Encrypt)
- Use Apache or nginx as reverse proxy
- Create a Facebook App and Page
- Get a Page access token and set it in
MESSENGER_TOKEN
environment variable - Use Supervisor to ensure your bot is always up and running
If you need more help through this steps, you can read How to create a Facebook Messenger bot with Swift blog post.
Every line of the project file are commented.
If you need Vapor documentation you can find it here.
If you need Telegram bot documentation you can find it here.
If you need Facebook Messenger bot documentation you can find it here.
To see what has changed in recent version of SwiftyBot, see the CHANGELOG.md file.
You can open Telegram and search for SwiftyBot and start talking with him!
You can open Facebook and search for SwiftyBotMessenger and start talking with him!
- Add Telegram support
- Add Facebook Messenger support
- Add tests
- Add code coverage reports
Fabrizio Brancati
Website: https://www.fabriziobrancati.com
Email: fabrizio.brancati@gmail.com
Roberto Chiaveri
Website: http://robertochiaveri.it
SwiftyBot is available under the MIT license. See the LICENSE file for more info.