Skip to main content

UNKNOWN

Project description

Class jabber bot on python

Install

pip install jabber-bot

Example

import xmpp
from jabber_bot import JabberBot

config = {
    'jid': 'username@jabber.org',
    '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

Project details


Release history Release notifications

This version
History Node

0.1.1

History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
jabber-bot-0.1.1.tar.gz (1.0 kB) Copy SHA256 hash SHA256 Source None Sep 26, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page