This module makes it easier to write MUC bots by removing the requirement that the bot be online and joined to the room.
All the bot needs to do is send a message and this module handles the rest.
Example configuration in Prosody:
"muc.example.com" "muc"
Component
= {
modules_enabled "muc_bot",
}
= { "bot@example.com" }
known_bots = false
bots_get_messages = true ignore_bot_errors
Simply send a stanza like this from your bot:
message type="groupchat" to="channel@muc.example.com">
<body>Beep boop, I'm a bot!</body>
<nick xmlns="http://jabber.org/protocol/nick">Botty</nick>
<message> </
Using mod_rest to interact with MUC suffers from the same need to join with an online resource, so this module helps with that as well!
curl https://xmpp.example.com/rest/message/groupchat/room@muc.example.com \
-d body="beep boop" \
-d nick="Botty"
Works with Prosody 0.12 or later.
With the plugin installer in Prosody 0.12 you can use:
sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_muc_bot
For earlier versions see the documentation for installing 3rd party modules