An open API service indexing awesome lists of open source software.

https://github.com/null-none/jabber-bot

Jabber bot on python
https://github.com/null-none/jabber-bot

Last synced: 2 months ago
JSON representation

Jabber bot on python

Awesome Lists containing this project

README

        

jabber-bot
====================

Class jabber bot on python

=======
Install
=======

.. code-block:: bash

pip install jabber-bot

=======
Example
=======

.. code-block:: python

import xmpp
from jabber_bot import JabberBot

config = {
'jid': '[email protected]',
'pass': 'pass'
}

def message_handler(conn, mess):
text = mess.getBody()
user = mess.getFrom()
reply = text
conn.send(xmpp.Message(mess.getFrom(), reply))

bot = JabberBot(config['jid'], config['pass'])
bot.register_handler('message', message_handler)
bot.start()

=======
License
=======

MIT