All Projects → vladfaust → Tele.cr

vladfaust / Tele.cr

Licence: mit
A convenient Telegram Bot framework 🤖

Programming Languages

crystal
512 projects

Labels

Projects that are alternatives of or similar to Tele.cr

Chatistics
💬 Python scripts to parse Messenger, Hangouts, WhatsApp and Telegram chat logs into DataFrames.
Stars: ✭ 814 (+5714.29%)
Mutual labels:  telegram
Torpedo
Pluggable, multi-network asynchronous chat bot written in Go
Stars: ✭ 19 (+35.71%)
Mutual labels:  telegram
Disatbot
DABOT: Disaster Attention Bot
Stars: ✭ 26 (+85.71%)
Mutual labels:  telegram
Sensu Plugins Telegram
Telegram handler for sensu
Stars: ✭ 7 (-50%)
Mutual labels:  telegram
Mypackbot
🤖 Your own unlimited pack of Telegram-stickers
Stars: ✭ 18 (+28.57%)
Mutual labels:  telegram
Pyrobot
Telegram Userbot powered by Pyrogram
Stars: ✭ 23 (+64.29%)
Mutual labels:  telegram
Informer
A Telegram Mass Surveillance Bot in Python
Stars: ✭ 745 (+5221.43%)
Mutual labels:  telegram
Pytelbot
A playful bot in telegram
Stars: ✭ 12 (-14.29%)
Mutual labels:  telegram
Micha
Client lib for Telegram bot api
Stars: ✭ 18 (+28.57%)
Mutual labels:  telegram
Yii2 Telegram Log
Telegram log target for Yii 2
Stars: ✭ 24 (+71.43%)
Mutual labels:  telegram
Telegraphist
🤖 Telegram Bot API on Go
Stars: ✭ 16 (+14.29%)
Mutual labels:  telegram
Tlsharp
Telegram client library implemented in C#
Stars: ✭ 895 (+6292.86%)
Mutual labels:  telegram
Tdlib Ios
An iOS Library to work with Telegram's tdlib.
Stars: ✭ 23 (+64.29%)
Mutual labels:  telegram
Java Telegram Bot Api
Telegram Bot API for Java
Stars: ✭ 819 (+5750%)
Mutual labels:  telegram
Xye Bot
Бот Хуификатор
Stars: ✭ 26 (+85.71%)
Mutual labels:  telegram
Inventory Hunter
⚡️ Get notified as soon as your next CPU, GPU, or game console is in stock
Stars: ✭ 778 (+5457.14%)
Mutual labels:  telegram
Telegram Standup Bot
Very simple telegram bot for submitting daily standups
Stars: ✭ 20 (+42.86%)
Mutual labels:  telegram
Logger Telegram Backend
A logger backend for Telegram
Stars: ✭ 13 (-7.14%)
Mutual labels:  telegram
Money bot
Docker-containered bot. Added to a group chat, she replies to any message containing price and currency pattern. Live!
Stars: ✭ 8 (-42.86%)
Mutual labels:  telegram
Vk To Telegram
Utility to forward posts from VK through callback API to telegram channel or chat
Stars: ✭ 24 (+71.43%)
Mutual labels:  telegram

Tele

A convenient Telegram Bot API framework.

Build Status Docs Dependency Status GitHub release

Installation

Add this to your application's shard.yml:

dependencies:
  tele:
    github: vladfaust/tele.cr
    version: ~> 0.1.4

Usage

require "tele"

class Start < Tele::Handlers::Message
  def call
    send_message(
      text: "Hello, <b>#{message.from.not_nil!.first_name}</b>!",
      parse_mode: "HTML",
    )
  end
end

class ExampleBot < Tele::Bot
  @@name = "ExampleBot"

  def handle(update)
    if message = update.message
      Start
    end
  end
end

bot = ExampleBot.new("BOT_API_TOKEN", 5000, Logger.new(STDOUT))
bot.set_webhook(URI.new(scheme: "https", host: "example.com"))
bot.listen

# => ExampleBot @ using Tele v0.1.0 by @vladfaust
# => ExampleBot @ webhook set to https://example.com
# => ExampleBot @ listening on port 5000
# => ExampleBot @ incoming text message from user @vladfaust (id 42): "/start"
# => ExampleBot @ handled in 594.0µs

See example/ for a full-featured example implementation.

Development

I love Crystal because if it compiles it means the program will definitely work. This reduces the amount of tests to be written. I personally write tests for SQL queries only. 😄

So there are no any tests for Tele at the moment.

Roadmap

  • [x] Inline queries
  • [x] Sending files
  • [x] Downloading files
  • [x] Multiple requests in one handler
  • [x] Broadcasting with Tele::Broadcast
  • [ ] HTTP Client pooling
  • [ ] Asynchronous requests
  • [ ] User state
  • [ ] I18n
  • [ ] getUpdates

Request groups to implement

Projects using Tele

Contributing

  1. Create an issue
  2. Fork it https://github.com/vladfaust/tele/fork
  3. Make it git checkout -b issue-42
  4. Do it git commit -am "feat: my feature\n\nFixes #42" (see Commit Message Conventions*)
  5. Makes us git push origin issue-42
  6. Better create a new Pull Request

* Please use these types: feat for new features, fix for bugfixes, ref for code refactoring, doc for documentation improvements, typo for fixing typos. Refer to this commit for a good example.

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].