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
- Host: GitHub
- URL: https://github.com/null-none/jabber-bot
- Owner: null-none
- Created: 2016-09-26T17:03:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-26T17:19:26.000Z (over 8 years ago)
- Last Synced: 2025-03-27T21:12:02.666Z (3 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
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 JabberBotconfig = {
'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