tourmaline
Version, currently master branch1 version
- master branchlatestJan 4, 2023
github.com/nilsding/tourmaline
Telegram Bot framework for Crystal
Installation
# Add this to your shard.yml
dependencies:
tourmaline:
github: nilsding/tourmaline
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.6.0- License
- MIT
- Author
- Chris Watson
Dependencies
Runtime Dependencies
- db~> 0.11.0github: crystal-lang/crystal-db
- html5~> 0.4.0github: naqvis/crystal-html5
- http_proxy*github: mamantoha/http_proxy, branch: master
Development Dependencies
README
Tourmaline
Telegram Bot API framework written in Crystal. Based heavily off of Telegraf this Crystal implementation allows your Telegram bot to be written in a language that's both beautiful and fast. Benchmarks coming soon.
If you want to extend your bot by using NLP, see my other library Cadmium.
Installation
Add this to your application's shard.yml:
dependencies:
tourmaline:
github: protoncr/tourmaline
branch: master
Usage
API documentation is also available here.
Examples are available in the examples folder.
Just for README purposes though, let's look at the echo bot example:
require "tourmaline"
class EchoBot < Tourmaline::Client
@[Command("echo")]
def echo_command(ctx)
ctx.message.reply(ctx.text)
end
end
bot = EchoBot.new(bot_token: ENV["API_KEY"])
bot.poll
Development
This currently supports the following features:
- [x] Client API
- [x] Implementation examples
- [x] Easy command syntax
- [ ] Robust middleware system
- [x] Standard API queries
- [x] Stickers
- [x] Inline mode
- [x] Long polling
- [x] Webhooks
- [x] Payments
- [x] Games
- [x] Polls
- [x] Telegram Passport
- [x] HTTP/HTTP Proxies
If you want a new feature feel free to submit an issue or open a pull request.
Who's Using Tourmaline
If you're using Tourmaline and would like to have your bot added to this list, just submit a PR!
Contributing
- Fork it ( https://github.com/protoncr/tourmaline/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- watzon Chris Watson - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jan 4, 2023
- Crystal
>= 1.6.0- Indexed
- yes
Dependents
Repository
github.com/nilsding/tourmaline
Metadata
- Created
- Aug 19, 2026
- Updated
- Sep 22, 2026
- Synced
- Sep 22, 2026
- Versions
- 1
