blob: e09e38e46ea8e2f6106fb0d151ca4f9cc238ce6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
* Granolin
Build better bots, for matrix!
+ Example Bots ::
- [[https://github.com/cbeo/posterbot][posterbot]], it posts pictures!
- [[https://github.com/gcentauri/snekeyes][snekeyes]], it rolls dice!
** TODO Defing a Bot
** TODO Event Handlers
*** Special Variables
**** *room-id*
The special variable =*room-id*= is available in your =handle-event= methods.
It will have the value of the Matrix room id in which the event occured. It
will be =nil= if the event is not a room state nor timeline/message event.
For example:
#+begin_src common-lisp
(defmethod handle-event :after ((cli echo-bot) (ev text-message-event))
(send-text-message cli *room-id* (msg-body ev)))
#+end_src
** Testing syncthing
|