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


Download files

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

Source Distribution

jabber-bot-0.1.1.tar.gz (1.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page