Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Nov 16, 2024. It is now read-only.
/tourmalinePublic archive

Simple Telegram bot library for Crystal

License

NotificationsYou must be signed in to change notification settings

protoncr/tourmaline

Repository files navigation

tourmaline logo

Tourmaline

Chat on Telegram

Telegram Bot API library written in Crystal. Meant to be a simple, easy to use, and fast library for writing Telegram bots.

Installation

Add this to your application'sshard.yml:

dependencies:tourmaline:github:protoncr/tourmalinebranch:master

Usage

API documentation is also availablehere.

Examples are available in theexamples folder.

Just for README purposes though, let's look at the echo bot example:

require"tourmaline"client=Tourmaline::Client.new(ENV["BOT_TOKEN"])echo_handler=Tourmaline::CommandHandler.new("echo")do |ctx|  text= ctx.text.to_s  ctx.reply(text)unless text.empty?endclient.register(echo_handler)client.poll

Roadmap

The following features are/will be implemented:

  • HTTP/HTTP Proxies
  • Client API
    • Implementation examples
    • Handlers for commands, queries, and more
    • Robust middleware system
    • Standard API queries
    • Stickers
    • Inline mode
    • Long polling
    • Webhooks
    • Payments
    • Games
    • Polls
    • Telegram Passport
  • Framework Adapters
    • Kemal
    • Amber
    • Lucky
    • Athena
    • Grip

If you want a new feature feel free to submit an issue or open a pull request.

Contributing

  1. Fork it (https://github.com/protoncr/tourmaline/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Thanks to all the people that have contributed to this project!

Contributors


[8]ページ先頭

©2009-2025 Movatter.jp