Skip to content
Snippets Groups Projects

Invoke the bot callback in an async wrapper.

Merged Joseph Walton-Rivers requested to merge feature-better-async into main
1 file
+ 20
4
Compare changes
  • Side-by-side
  • Inline
+ 20
4
@@ -2,6 +2,9 @@
*note:* This is currently a (functional) work in progress.
Most development takes place on our gitlab server. We mirror to github because people have trouble finding
working errbot matrix backends, and well... ours kinda works :). PRs/issues/comments welcome.
## Features
* Single (1:1) rooms with the bot, which it considers private
* Group/named rooms
@@ -18,9 +21,10 @@
### Still todo
Most (all) of these are in the library, just need mapping
* Some missing features for backend API (room methods, user methods)
* Some missing features for backend API (invites, room methods)
* Support for non-text message types (ie, images - limited support in place)
* Support for reactions (adding implemented, removing not implemented)
* Support for redacting reactions (adding implemented, removing not implemented)
* Support for message editing/redactions
# Known issues
@@ -28,11 +32,13 @@ Most (all) of these are in the library, just need mapping
* !room join doesn't work, invite the bot to a room via matrix's invite process
* Although implemented, matrix chat effects don't seem to work.
* The bot defaults to 'text' rather than the more correct 'notice' for outgoing messages - it might not play nice with other bots.
* Careful when accessing async code, it works as-is, but can be a bit temprimental if you call async methods from sync ones.
# Setup Steps
The bot requires an exisitng account and access token. Once you have these setting up the bot is relatively
simple.
simple. The backend isn't currently on pypy, so you need to put it somewhere the bot can find it. We store
ours in a backends directory.
The configuration file for errbot looks like this:
@@ -42,6 +48,16 @@ bot_extra_backend_dir = r'./backends/' # path to backends folder
BOT_IDENTITY = {
'homeserver': 'https://matrix.fgmx.uk',
#'token': '' # ACCESS TOKEN HERE
'token': 'MATRIX_ACCESS_TOKEN'
}
```
If you'd like to see a dockerised example, [fg-errbot's repo](https://git.fossgalaxy.com/irc/errbot/fg-errbot)
is our production setup, and it's FOSS. You can also find our collection of [errbot plugins](https://git.fossgalaxy.com/irc/errbot)
on our gitlab server.
If you'd like to see the matrix-spesific features exposed by the backend, ([see the our errbot-matrix plugin](https://git.fossgalaxy.com/irc/errbot/errbot-matrix/-/blob/main/matrix.py)).
## Thanks
This repository was inspired by existing err backends on github, namely the discord, slack and nio-matrix
backends.
Loading