tele-broadcast.cr alternatives and similar shards
Based on the "Framework Components" category.
Alternatively, view tele-broadcast.cr alternatives based on common mentions on social networks and blogs.
-
shrine.cr
File Attachment toolkit for Crystal applications. Heavily inspired by Shrine for Ruby. -
Exception Page
An exceptional exception page for Crystal web libraries and frameworks -
artanis
Sinatra-like DSL for the Crystal language (abusing macros) -
praetorian
A minimalist Crystal authorization system inspired by https://github.com/varvet/pundit. -
motion.cr
Motion is a framework for building reactive, real-time frontend UI components in your Amber application using pure Crystal that are reusable, testable & encapsulated. -
kemal-auth-token
Kemal middleware to authentication via HTTP header token using JWT -
device_detector
Crystal shard for device detection by User-Agent string -
mochi
Mochi is a authentication shard inspired by devise. Mochi is designed for the Amber framework with support for both Granite & Jennifer ORM's. -
mime-types.cr
MIME Types for Crystal :: A port of the Ruby MIME::Types library -
Athena Event Dispatcher
A Mediator and Observer pattern event library -
request_id
Middleware for generates / pick up a unique request ID for Crystal servers. -
Athena Negotiation
Framework agnostic content negotiation library
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of tele-broadcast.cr or a related project?
README
Tele::Broadcast

A broadcasting module for Tele.cr.
Installation
Add this to your application's shard.yml
:
dependencies:
tele-broadcast:
github: vladfaust/tele-broadcast.cr
version: ~> 0.1.3
Usage
Read some docs when you need.
Tele::Broadcast
is agnostic of ORM structure, you just pass a list of Tele::Request
s and an list of recipients chat IDs and run the Woker. You can either create a custom CLI for broadcasting from the local machine or develop a web-interface.
Client
The client allows to schedule broadcasts:
require "tele/requests/send_message"
require "tele-broadcast/client"
require "tele-broadcast/repositories/redis"
logger = Logger.new(STDOUT).tap(&.level = Logger::DEBUG)
repo = Tele::Broadcast::Repositories::Redis.new(Redis.new, logger, "example_bot:broadcast:") # Don't forget to add a colon in the end of namespace
client = Tele::Broadcast::Client.new(repo, logger)
request = Tele::Requests::SendMessage.new(chat_id: 0, text: "Hello from Tele::Broadcast!")
recipients = [116543174, 155633478] of Int32 # A list of Telegram IDs
client.broadcast(requests, recipients)
# => INFO -- : Added payload #1 to the broadcasting queue
Check out examples/client.cr
and try it yourself:
crystal /examples/client.cr -- --text="Hola!" -r <Your Telegram ID>
Please not that you have to contact the bot at least once so it can send you messages.
Worker
The worker periodically checks for new broadcasts and handles them:
require "tele-broadcast/worker"
require "tele-broadcast/repositories/redis"
logger = Logger.new(STDOUT).tap(&.level = Logger::DEBUG)
repo = Tele::Broadcast::Repositories::Redis.new(Redis.new, logger, "example_bot:broadcast:") # Don't forget to add a colon in the end of namespace
worker = Tele::Broadcast::Worker.new("BOT_API_TOKEN", repo, logger)
worker.run
# => INFO -- : Tele::Broadcast::Worker worker is running!
# => INFO -- : Started broadcasting payload #1 to 2 recipients...
# => DEBUG -- : Recipient 116543174 has blocked the bot, skipping
# => DEBUG -- : Sending request #727 to 155633478...
# => DEBUG -- : Delivered request #727 in 0.29s
# => INFO -- : Done broadcasting payload #1 in 0.29s!
Try it yourself:
crystal /examples/worker.cr -- -t <BOT_API_TOKEN>
Development
There are tests! So please run crystal spec
while developing.
Contributing
- Fork it ( https://github.com/vladfaust/tele-broadcast.cr/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
- @vladfaust Vlad Faust - creator, maintainer