telega alternatives and similar packages
Based on the "Control" category.
Alternatively, view telega alternatives based on common mentions on social networks and blogs.
-
transient
A full stack, reactive architecture for general purpose programming. Algebraic and monadically composable primitives for concurrency, parallelism, event handling, transactions, multithreading, Web, and distributed computing with complete de-inversion of control (No callbacks, no blocking, pure state) -
selective
Selective Applicative Functors: Declare Your Effects Statically, Select Which to Execute Dynamically -
ComonadSheet
A library for expressing "spreadsheet-like" computations with absolute and relative references, using fixed-points of n-dimensional comonads. -
auto
Haskell DSL and platform providing denotational, compositional api for discrete-step, locally stateful, interactive programs, games & automations. http://hackage.haskell.org/package/auto -
transient-universe
A Cloud monad based on transient for the creation of Web and reactive distributed applications that are fully composable, where Web browsers are first class nodes in the cloud -
monad-validate
DISCONTINUED. (NOTE: REPOSITORY MOVED TO NEW OWNER: https://github.com/lexi-lambda/monad-validate) A Haskell monad transformer library for data validation -
distributed-process-platform
DEPRECATED (Cloud Haskell Platform) in favor of distributed-process-extras, distributed-process-async, distributed-process-client-server, distributed-process-registry, distributed-process-supervisor, distributed-process-task and distributed-process-execution -
effect-monad
Provides 'graded monads' and 'parameterised monads' to Haskell, enabling fine-grained reasoning about effects. -
ixmonad
Provides 'graded monads' and 'parameterised monads' to Haskell, enabling fine-grained reasoning about effects.
SaaSHub - Software Alternatives and Reviews
Do you think we are missing an alternative of telega or a related project?
README
Inline Telegram Bot API library
Work in progress, there is an application for testing design of this library: https://github.com/iokasimov/elections-bot
Introduction
This library provides ORM-like toolkit to deal with methods of Telegram Bot API - types and classes were designed in terms of Objects
and their Properties
.
Objects description:
Update
: object that webhook consumes, can be either an incomingMessage
,Callback
query orMoving
in/out some group chat.Message
: every object containsOrigin
andContent
, can be eitherDirect
,Forwarded
orReplied
.Content
: can be eitherCommand
,Text
,File
,Poll
,Contact
,Location
orVenue
.File
: Can be eitherAudio
,Document
,Photo
,Video
orVoice
.Origin
: indicates where is message from, containsSender
.Callback
: this is what webhook consumes on pressing inline keyboard's button.Group
: can be eitherBasic
orSuper
, contains chat ID and title.Moving
: indicates whichSender
leaved some chat or whichSender
s joined, also containsGroup
.Sender
: can be either aBot
or aHuman
.Member
: shows the status of a bot or user in group chat, containsSender
.
Properties description:
Accessible
: provides lens for objects within other objects.Identifiable
: provides identification of objects to use it for requests.Persistable
: providespersist
methods that returns you value of some type on success. The "on success" definition is rather vague, for example: if you try to edit object and it remains the same, nothing will returns. Usepersist_
to not decode API answer (because if decoding fails the next applicative or monadic action will not happen).
Available persistent actions over objects:
Forward
: onlyMessage
.Reply
: everything that you canSend
.Send
:Text
,Keyboard
,Audio
,Document
,Video
,Voice
,Photo
,Location
,Live Location
,Poll
.Delete
:Message
.Edit
:Text
,Keyboard
,Live Location
.Stop
:Live Location
,Poll
.
See payload and returning value in Persistable
instances.
Also, you can Forward
, Reply
and Send
objects Silently
.
Also, there are special persistent actions for chat members:
Kick
: kick user from group, user can not return unless unbanned firstRestrict
: change what some member in group can do.Promote
: change what some admin in group can do.
Simple examples
Sending inline keyboard
let text = "Just click any button..."
let button1 = Button "Press me!" $ Callback "1"
let button2 = Button "Or press me!" $ Callback "2"
let button3 = Button "No, press me!" $ Callback "3"
let keyboard = Inline [button1, button2, button3]
void . persist . Send chat_id $ text :&: keyboard
Handling pressing buttons with notification
webhook (Query _ (Datatext cbq_id _ _ bn)) = do
let text = "The button you pressed is: " <> bn
persist $ Trigger @Notification cbq_id text
Deleting all incoming messages
webhook (Incoming _ msg) = do
let chat_id = ident $ access @Origin msg
persist (Delete @Message chat_id $ ident msg)