GithubHelp home page GithubHelp logo

dammer / tourmaline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from protoncr/tourmaline

0.0 1.0 0.0 9.07 MB

Telegram Bot framework for Crystal

Home Page: https://tourmaline.dev

License: MIT License

Crystal 99.90% Python 0.10%

tourmaline's Introduction

tourmaline logo

Tourmaline

Chat on Telegram

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:

  • Client API
    • Implementation examples
    • Easy command syntax
    • Robust middleware system
    • Standard API queries
    • Stickers
    • Inline mode
    • Long polling
    • Webhooks
    • Payments
    • Games
    • Polls
    • Telegram Passport
  • 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

  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

  • watzon Chris Watson - creator, maintainer

tourmaline's People

Contributors

banashek avatar dammer avatar drvtiny avatar h4ckm03d avatar hmnd avatar nordborn avatar oprypin avatar tomsotte avatar watzon avatar yashko avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.