Functions for processing streams of EDN
Functions for processing streams of EDN
(count-invites evs)
Given an event stream, returns the count of invites (Presuming only invites to this bot will show up in the stream!)
Given an event stream, returns the count of invites (Presuming only invites to this bot will show up in the stream!)
(count-mentions bot-name evs)
Given an event stream, returns the count of mentions of cthulhu
Given an event stream, returns the count of mentions of cthulhu
(event-contains? target ev)
GIven a matrix event, returns true if the body of the event contains the target string
GIven a matrix event, returns true if the body of the event contains the target string
(is-invite? ev)
Given a matrix event, returns true if it is an invite event
Given a matrix event, returns true if it is an invite event
(rooms-matching-filter event-type filter-fn stream)
Tiven an event type, a function to filter on that takes an event stream, and a stream, returns the names of the rooms that match the filter.
Tiven an event type, a function to filter on that takes an event stream, and a stream, returns the names of the rooms that match the filter.
(stream->mentions bot-name stream)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close