SwiftyBot travis-ci SwiftPM

How to create a Telegram bot with Swift using Vapor on Ubuntu / macOS

SwiftyBot Banner

Build Status Codebeat Badge Version Language Platform License


What does it doLanguage supportRequirementsCommunicationContributingInstalling and UsageDocumentationChangelogDemoTodoAuthorLicense


What does it do

SwiftyBot is an example on how to create a Telegram bot with Swift using Vapor.
Read more about it at How to create a Telegram bot with Swift using Vapor on Ubuntu / macOS.

Language support

  • English (en)

Requirements

  • Ubuntu 14.04 or later with Swift 3
  • macOS with Xcode 8
  • Telegram account and a Telegram App for any platform

Communication

  • If you need help, use Stack Overflow.
  • 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.

Contributing

See CONTRIBUTING.md file.

Installing and Usage

Swift & Vapor experts

  • Install Swift on your computer / server
  • Install Vapor Toolbox (Optional)
  • Set a secret key in secrets/app.json
  • Enable TLS (You can use Let’s Encrypt)
  • Use Apache or nginx as a reverse proxy
  • Create a Telegram bot with BotFather
  • Use Supervisor to ensure your bot is always running

Swift & Vapor newbie

To see how to install and make the bot working, check How to create a Telegram bot with Swift using Vapor on Ubuntu / macOS blog post.

Documentation

Every line of main.swift and String+BFKit.swift file is commented.

Changelog

To see what has changed in recent version of SwiftyBot, see the CHANGELOG.

Demo

You can open Telegram and search for SwiftyBot and start talking with him!

Todo

  • [ ] Add more functions and commands
  • [ ] Add support for combined emoji on Linux
  • [ ] Add support for edited messages
  • [ ] Add support for images
  • [ ] Use a database to define a user state (Example: reverse, uppercase, lowercase, etc…)
  • [ ] Improve reversed function in String+BFKit.swift
  • [ ] Include BFKit-Swift dependency instead of a single file like String+BFKit.swift

Author

Fabrizio Brancati

Website
Email

License

SwiftyBot is available under the MIT license. See the LICENSE file for more info.

Related Repositories

SwiftyBot

SwiftyBot

How to create a Telegram bot with Swift using Vapor on Ubuntu / macOS ...


Top Contributors

FabrizioBrancati

Releases

-   1.0.0 zip tar