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 details)

Uploaded Source

File details

Details for the file jabber-bot-0.1.1.tar.gz.

File metadata

  • Download URL: jabber-bot-0.1.1.tar.gz
  • Upload date:
  • Size: 1.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for jabber-bot-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c47054bf582ee7dec1f11f36dff7eb86f9affee4c57f4dcdd8c4ce24efd3afdf
MD5 fdd6f4d072fb2c13603673952abb0534
BLAKE2b-256 ecd63fbce1ba73e223adfffffd5570baf366dd6d59ad1c898d6ea707310def4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page