Matrix bots I think we need (what do you think)?

I am here giving them functional names, but we could also give them clever names. Some of these bots include existing functionality from Zodbot, some are new ideas.

Zodbot is currently a big monolith. I think it’d be nice to actually break these up into smaller roles.

These are ones I’m pretty sure we want – in rough order of importance.

  1. meetbot – logs meetings, sends those logs to møte
  2. cookiebot – translates username++ into badges (and perhaps enables other recognition stuff beyond just plus-plusses)
  3. channelbot – we need this for technical reasons in each :fedoraproject.org channel. Primarily, its job is to just sit there. But maybe it could do other things too! Unlike other bots, needs to be @whatevernamebot:fedoraproject.org instead of @whatevernamebot:fedora.im.
  4. schedulebot – tells you when the next meeting is, maybe can do more (like tell you about the Fedora Linux schedule?)
  5. people info bot – tells you about Fedora Account info
  6. newsbot – posts annoucements in the news channel. Might want to have this one running twice, one at @newsbot:fedoraproject.org for official announcements (like stuff that would go on announce-list) and @newsbot:fedora.im for commblog posts, devel-announce, etc.
  7. interactionbot – does stuff like .fire mattdm (try that in IRC with zodbot)
  8. welcomebot – helps new users find resources
  9. badgesbot – tells number of badges held by a user. Could maybe do more, like report when badges are earned in certain channels, or report on changes in the top 10.
  10. packageinfobot – returns stuff about, you know, packages.

What am I missing? What else would be really useful to have? What else would be fun?

2 Likes

I don’t know if I like this, considering that some CommBlog posts are official announcements. Considering how few messages we put on announce (basically releases), having a separate bot just for it seems unnecessary.

Does this include groups, too? e.g. the .members command in zodbot?

Maybe it would fit in interaction bot, but a bugs/tickets bot would be good to have, too. Something that does what zodbot currently does with .bug, .fesco, etc.

I’m not fully sold on “zodbot as a monolith is bad”. For one, it means more bots to make sure are alive in channels. Secondly, it makes it harder for people to remember what bot to message for a query if they don’t want to post in a channel (e.g. I often message zodbot to do .fas and .fasinfo queries to keep from unnecessarily pinging people in channels). I like the idea of having the code be more modular, but there are some benefits in having it be presented as a single bot.

Okay, that might be a bad / unnecessary distinction. We could instead make the bot smart enough to format different types of posts differently.

I was thinking so, yes. Basically everything Account System.

Yeah, that makes sense. And here I think it’d be good to have a bot that understands multiple systems, so .fesco still works if we move to a different issue tracker.

metabot – forwards all messages to the appropriate bot.

1 Like

Also, a thought a little bit separate from “what bots to have” but I figured I’d write it down while I’m having it: Matrix allows for richer formatting and for things like emoji reactions to messages. It would be nice for the Future Meeting Bot to capture these things too, not just the text transcript.

1 Like

As far as “fun” goes, #fedora-social has a properly Fedora cloaked “baconbot”, which is popular for giving replies about bacon, as an alternative weather source, and editing your last tweet, I mean IRC message, with regex. It’s all open source and the bacon plugin is at https://github.com/vwbusguy/cardinal-plugin-bacon

1 Like

On the monolith-or-not issue: I can see an argument against splitting too far, but I think it at least makes sense to split

  1. meeting-logging bot
  2. things that query our apps and datasources
  3. silly / fun stuff (possibly grouped with “welcome”, too)

We have talked about splitting up zodbot several times, but not done it, mostly for the reasons mentioned above: knowing what bot/nick to talk to, not running N bots that have to all be maintained, etc. Also, a lot of the functions of zodbot are just added on the fly… they are aliases or simple lookups. Writing and running an entire bot to do that seems overkill and also less flexable.

I think we don’t want to split it too much, but some could be useful.

Also, we likely need to make sure it works with the irc bridge (at least for as long as we are keeping them bridged) so users there aren’t left out.

The meeting functionality is the biggest thing here… the rest could be later or worked around.

Yeah, those 3 seem like a good split…

1 Like

One consideration is that though many Libera channels are bridged, not all Matrix channels are, and many bots work over IRC but not Matrix protocol directly, which may be a factor for “Matrix bots”.

I’m thinking we want the bots to be Matrix-based, at the very least so they can handle emojis.

(I’m ha-ha-only-serious on this… it’d be awesome to be able to count responding with “:cookie:” as equivalent to mattdm++.)

1 Like

That may significantly limit the options, then. IRC and Matrix are very different protocols and most Matrix bots are for very specific cases: https://matrix.org/bots/

The only Matrix+IRC compatible bot I could find is https://github.com/torhve/ivar2 which describes itself this way:

“ivar2 is an IRC/Matrix bot on speed, with a mentally unstable mind. Partially because its written in Lua, which could make the most sane mind go unstable. If that’s not obscure enough for you, ivar2 also supports running MoonScript modules.”

I suppose the real question is if the bot supports emoji?

I guess that matters most if it’s trying to talk both IRC and matrix, rather than just talking on the Matrix side and working over the bridge?

Or am I missing something?

If the bot is specifically for emoji reactions then the bridge is moot, I guess, since IRC doesn’t do emoji reactions, but I’m having trouble finding a bot that does support it currently. That doesn’t mean someone couldn’t add it to https://github.com/vranki/hemppa , etc., but we’re definitely going to be limited in out of the box capabilities for some things for bots on Matrix protocol.

I should point out that IRC can support emoji in messages, but not the reactions in Matrix. Those are ignored in IRC on bridged chans. Replying with a cookie in a message might be preferable anyway so that IRC chan members have awareness of an action, too. That still doesn’t help for rooms like Fedora Social Hour, etc., that don’t currently have an associated Libera channel.

I don’t mean only emoji functionality, but it’d be nice to have (like as mentioned having the meeting logs include them, and maybe even images).

2 posts were split to a new topic: How can bots authorize against the new Fedora Chat matrix server?

Here’s an example from the Rust Discord of the kind of stuff that can be done with bots which understand emoji reactions. We’d probably want to provide an alternate way to any such action, but I like the possibility.

r

Hi all! I’m doing the Matrix work for the Ansible community, and following a quick chat with @mattdm, it was suggested I put some of my thoughts on bots here for your consumption :slight_smile:

  • meetbot - I have yet to find something that does meetings as well as zodbot on the Matrix side, so we’re still using that. However, Matrix has the bonus of always having history, so I think the key part here is the commands like #info, #action, and so forth. Having a bot that could gather those would be the minimum-viable thing here, I think. Reactions could be very useful, but obviously would be Matrix-only (think: an emoji for #info, etc, and the bot collates comments marked as such)
  • schedulebot - we’re using https://github.com/anoadragon453/matrix-reminder-bot which allows us to set reminders in the channel. it’s all “!command” driven so works for IRC too. Not exactly the same, but perhaps handy?
  • There’s also https://github.com/maubot/reminder which is another take using reactions to subscribe to other people’s reminders. A cool idea but reactions don’t work in IRC, so I didn’t go for it.
  • That second option is a maubot plugin. Maubot is an excellent bot framework with many plugins, so worth a look for other needs (https://github.com/maubot/maubot#official-plugins) and a good potential starting point for writing new Matrix bot plugins. (c.f @bcotton’s point about monoliths, maubot gives you a single place to manage all the bots, and assign which bots have which plugins enabled)
  • for interactions with other platforms, there are numerous github bots already, work a look

News is a bigger topic, because that has several strands. There’s a few things you could think about:

  • Discourse / mailing lists can generate RSS. I know GNOME have a Matrix room that only the RSS bot can post in (but anyone can join), so that announcements elsewhere can come through to the Matrix users
  • RSS bots can obviously be added elsewhere, there is a Maubot plugin for it.
  • For a different take on more interactive news, take a look at This Week In Matrix. There, the community posts it’s own news updates (in markdown format) and the TWIM bot collates them for the editor to tidy up on a Friday. This has some interesting features:
    • The bot uses reactions to sort the news items into categories (https://github.com/matrix-org/twim-o-matic#emoji-section-map)
    • Users get to word their update their way, which is nice
    • The room becomes full of interesting discussion (“oh hey, that update is cool, how did you solve X?”), it’s essentially Matrix-meta
    • Strongly looking at this for how we generate our newsletters, there is a generic TWIM bot that can be used for any community (https://github.com/haecker-felix/hebbot, thanks GNOME!)

In general, I love the idea of bots using reactions, but until IRC is a down to a small fragment of the community, it’s too exclusionary (since reactions do not appear in IRC at all, and there is no way to send them). Best case, of course, would be reactions with a subcommand fallback.

For admin work, we’re running a self-hosted instance of Mjolnir - the bot needs access to Synapse for certain things, but most of its work does not, so we can self-host while we evaluate it. I really like Mjolnir, but that’s probably a post on it’s own - at the very least, it’s use of reactions to acknowledge commands is :ok_hand:

In terms of writing bots, I have a few ideas of my own. I know polls are on Element’s roadmap, but for now I’d love to replace my IRC pollbot, because constructing the polls is tedious. Also a channel-map bot would be cool (so someone says you should join #users:ansible.im" and the bot says “that’s #ansible-users if you’re on IRC btw”). The Matrix Client API is a REST API, and there are numerous bot frameworks already, so it shouldn’t be any harder than writing an IRC bot. I’m definitely interested in writing some bots myself, so if others are going to be working on that, I’d love to collaborate.

I’m sure I have more thoughts in my brain somewhere, but that’s what I’ve got for now. Very happy to eloborate / discuss things more, it’s a rich topic!

4 Likes