Bot to manage a xmpp ejabberd node from your Akkoma instance, by posting keywords to it. The bot can register you, unregister you and show you the ejabberd node stats.
Anar al arxiu
2022-08-29 12:52:30 +02:00
app/locales Added 'ca' and 'en' locales strings, updated ejabberdapi 2022-08-18 10:20:31 +02:00
akkomabot.py Fix #2 2022-08-29 11:51:53 +02:00
LICENSE Add LICENSE and README.md 2022-07-24 21:14:42 +02:00
README.md New feature! ejabberd's user_sessions_info endpoint! 2022-08-10 20:31:07 +02:00
requirements.txt Akkoma and EjabberdAPI classes are now downloable from PyPi 2022-08-29 10:41:50 +02:00
xmpp.py Added setup attribute to EjabberdAPI library. Related to #3 2022-08-29 12:52:30 +02:00

xmpp Akkoma bot

Bot to manage a xmpp ejabberd node from an Akkoma instance, by posting keywords to it.

The bot only listen keywords from your Akkoma instance local users. They can register themselves to your ejabberd xmpp server, unregister, your xmpp node stats and more!.
The keywords that they can issue against the bot are the following:

@your_bot register
@your_bot unregister
@your_bot stats
@your_bot status
@your_bot sessions

The bot will process any of the above keywords thanks to the wrapper for ejabberd API (ejabberdapi.py, included) and the wrapper for Akkoma API (akkoma.py, also included) but, first time you run python xmpp.py, it will ask you for the needed parameters like:

  • api_base_url: http://127.0.0.1:5280
  • local_vhost: your local ejabberd vhost
  • admin_account: the ejabberd admin account, in exemple admin@ejabberd.server
  • admin_pass: ejabberd admin account password
  • Akkoma hostname: in ex. akkoma.host
  • bot's replies language (ca or en)

Requirements

  • Akkoma instance
  • xmpp ejabberd node with admin privileges

Before running python xmpp.py:

  1. git clone https://git.mastodont.cat/spla/xmpp.git target_dir.
  2. cd target_dir
  3. create the Python Virtual Environment with python3.x -m venv .
  4. activate it with source bin/activate
  5. run pip install -r requirements.txt to install required libraries.
  6. set up your contrab to run python xmpp.py every minute.

Enjoy!

  • 9.8.2022 New feature! Added lang support! bot replies's lang is configured during setup. Only ca or en are actually supported.
  • 9.8.2022 New feature! Added status command!
  • 10.8.2022 New feature! ejabberd's user_sessions_info endpoint!